From b6420e12a967b8e96fd87a86dd8d105962bfdf8b Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 13 Apr 2019 23:37:03 +0000 Subject: lmdb: catch non-LMDB negative errors before strerror That should hopefully shut coverity up --- external/db_drivers/liblmdb/mdb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'external') diff --git a/external/db_drivers/liblmdb/mdb.c b/external/db_drivers/liblmdb/mdb.c index 8e67d5981..ba1315401 100644 --- a/external/db_drivers/liblmdb/mdb.c +++ b/external/db_drivers/liblmdb/mdb.c @@ -1742,6 +1742,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 } -- cgit v1.2.3