aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-04-27 23:08:56 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-04-27 23:08:56 +0000
commitb770d7afd08231270f0fb23c286e8111f65903ec (patch)
tree5db4f0429de6112086bbbd8705109bbd625056fa /man.c
parent9cd87470cdc8d66ea0c03415fc6b2a2bea8e82cb (diff)
downloadmandoc-b770d7afd08231270f0fb23c286e8111f65903ec.tar.gz
mandoc-b770d7afd08231270f0fb23c286e8111f65903ec.tar.zst
mandoc-b770d7afd08231270f0fb23c286e8111f65903ec.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 'man.c')
0 files changed, 0 insertions, 0 deletions