]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
lmdb: catch non-LMDB negative errors before strerror
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>
Sat, 13 Apr 2019 23:37:03 +0000 (23:37 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 14 Aug 2022 19:40:50 +0000 (20:40 +0100)
That should hopefully shut coverity up

libraries/liblmdb/mdb.c

index 40728e716bf3ed77371bf1933ef2d349b61ccee1..3b4652ec6467384650de5b7887c70aa738b2ade6 100644 (file)
@@ -1752,6 +1752,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
 }