lmdb: catch non-LMDB negative errors before strerror

That should hopefully shut coverity up
This commit is contained in:
moneromooo-monero 2019-04-13 23:37:03 +00:00
parent 37345921ec
commit b6420e12a9
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 2 additions and 0 deletions

View File

@ -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
}