Fix segfault on file-not-found

This commit is contained in:
whydoubt 2005-03-28 03:33:11 +00:00
parent 56e81caf58
commit 6587feb47e
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,5 @@
* src/libmdb/file.c: Fix segfault on file-not-found
Tue Mar 22 21:51:06 CST 2005 Jeff Smith <whydoubt@yahoo.com>
* src/libmdb/data.c: Fix a bug in mdb_find_row

View File

@ -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));