From: moneromooo-monero Date: Sat, 13 Apr 2019 23:37:03 +0000 (+0000) Subject: lmdb: catch non-LMDB negative errors before strerror X-Git-Tag: LMDB_0.9.30~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a7645033683844c71f9f0068c85f69d453afdd2;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 3847ec62ba..527a47b8f1 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -1517,6 +1517,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 }