summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/buffer.h
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2014-04-27 23:03:52 +0000
committerschwarze <schwarze@openbsd.org>2014-04-27 23:03:52 +0000
commitb72d2ce07a5aa4c69a70ee8544070a63f9db5964 (patch)
tree42e612d1d2b666000dda1f7923482e830f83e381 /usr.bin/ssh/buffer.h
parentFor LUNA88K, make sure the architecture name shown to the user (diff)
downloadwireguard-openbsd-b72d2ce07a5aa4c69a70ee8544070a63f9db5964.tar.xz
wireguard-openbsd-b72d2ce07a5aa4c69a70ee8544070a63f9db5964.zip
Improve error handling in dbopen(). If PRAGMA SQL statements fail,
report the error, close the database, and return failure from dbopen(), such that the main program can recover and rebuild the database. As noticed by stsp@, this can happen when database files are accessible, but corrupt or in the wrong format, which will now automatically be repaired. Besides, use a safer idiom after sqlite3_open*() failure that also handles out-of-memory situations correctly, and do not forget to close the database after CREATE TABLE failure.
Diffstat (limited to 'usr.bin/ssh/buffer.h')
0 files changed, 0 insertions, 0 deletions