mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-02-26 22:02:43 +08:00
Fix segfault on file-not-found
This commit is contained in:
@@ -112,6 +112,10 @@ MdbHandle *mdb_open(const char *filename, MdbFileFlags flags)
|
||||
|
||||
mdb = (MdbHandle *) g_malloc0(sizeof(MdbHandle));
|
||||
mdb_set_default_backend(mdb, "access");
|
||||
#ifdef HAVE_ICONV
|
||||
mdb->iconv_in = (iconv_t)-1;
|
||||
mdb->iconv_out = (iconv_t)-1;
|
||||
#endif
|
||||
/* need something to bootstrap with, reassign after page 0 is read */
|
||||
mdb->fmt = &MdbJet3Constants;
|
||||
mdb->f = (MdbFile *) g_malloc0(sizeof(MdbFile));
|
||||
|
||||
Reference in New Issue
Block a user