lmdb: catch non-LMDB negative errors before strerror

That should hopefully shut coverity up
mdb.master
moneromooo-monero 6 years ago committed by Howard Chu
parent 5a4f5c964a
commit 1b113f2c94
  1. 2
      libraries/liblmdb/mdb.c

@ -1752,6 +1752,8 @@ mdb_strerror(int err)
NULL, err, 0, ptr, MSGSIZE, (va_list *)buf+MSGSIZE); NULL, err, 0, ptr, MSGSIZE, (va_list *)buf+MSGSIZE);
return ptr; return ptr;
#else #else
if (err < 0)
return "Invalid error code";
return strerror(err); return strerror(err);
#endif #endif
} }

Loading…
Cancel
Save