mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-11-26 02:09:49 +08:00
Fixed severe double-free bug on mdb_clone_handle with immediate mdb_close() afterwards leading to memory corruption
This commit is contained in:
@@ -327,6 +327,7 @@ MdbHandle *mdb_clone_handle(MdbHandle *mdb)
|
|||||||
for (i=0;i<mdb->num_catalog;i++) {
|
for (i=0;i<mdb->num_catalog;i++) {
|
||||||
entry = g_ptr_array_index(mdb->catalog,i);
|
entry = g_ptr_array_index(mdb->catalog,i);
|
||||||
data = g_memdup(entry,sizeof(MdbCatalogEntry));
|
data = g_memdup(entry,sizeof(MdbCatalogEntry));
|
||||||
|
data->props = NULL;
|
||||||
g_ptr_array_add(newmdb->catalog, data);
|
g_ptr_array_add(newmdb->catalog, data);
|
||||||
}
|
}
|
||||||
mdb->backend_name = NULL;
|
mdb->backend_name = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user