From: moneromooo-monero Date: Sat, 13 Apr 2019 23:37:03 +0000 (+0000) Subject: lmdb: catch non-LMDB negative errors before strerror X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b113f2c94940bedbe86332f0c802db031814749;p=thirdparty%2Fopenldap.git lmdb: catch non-LMDB negative errors before strerror That should hopefully shut coverity up --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 40728e716b..3b4652ec64 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -1752,6 +1752,8 @@ mdb_strerror(int err) NULL, err, 0, ptr, MSGSIZE, (va_list *)buf+MSGSIZE); return ptr; #else + if (err < 0) + return "Invalid error code"; return strerror(err); #endif }