aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-13 23:37:03 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-14 09:19:04 +0000
commitb6420e12a967b8e96fd87a86dd8d105962bfdf8b (patch)
tree72f950a1c51793fffde7e520009a2a3e4cca5ee1 /external
parentMerge pull request #5423 (diff)
downloadmonero-b6420e12a967b8e96fd87a86dd8d105962bfdf8b.tar.xz
lmdb: catch non-LMDB negative errors before strerror
That should hopefully shut coverity up
Diffstat (limited to 'external')
-rw-r--r--external/db_drivers/liblmdb/mdb.c2
1 files changed, 2 insertions, 0 deletions
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
}