[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#8419) mdb_env_stat crashes when the env argument hasn't been opened yet



Full_Name: Andrew Schorr
Version: lmdb 0.9.18
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (38.76.0.51)


I am implementing a gawk lmdb API. As a silly test, I ran the following code:

gawk -l lmdb '
BEGIN {
   env = mdb_env_create()
   rc = mdb_env_stat(env, f)
}'

It catches a SIGSEGV. It is apparently illegal to call mdb_env_stat before
calling mdb_open. Please consider updating the documentation or updating the
function to 
protect against this situation.

Thanks,
Andy