Merge pull request #5440

b6420e12 lmdb: catch non-LMDB negative errors before strerror (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2019-04-15 09:23:09 +02:00
commit 1f809e7485
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD

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
}