mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-01-02 12:27:09 +08:00
Basic checks on file to ensure it's an mdb database. bug # 587739
This commit is contained in:
@@ -97,7 +97,10 @@ main(int argc, char **argv)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
mdb_read_catalog(mdb, MDB_TABLE);
|
||||
if (!mdb_read_catalog (mdb, MDB_TABLE)) {
|
||||
fprintf(stderr,"File does not appear to be an Access database\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
for (i=0;i<mdb->num_catalog;i++) {
|
||||
entry = g_ptr_array_index(mdb->catalog,i);
|
||||
|
||||
@@ -74,9 +74,11 @@ main (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
/* read the catalog */
|
||||
|
||||
mdb_read_catalog (mdb, MDB_TABLE);
|
||||
/* read the catalog */
|
||||
if (!mdb_read_catalog (mdb, MDB_TABLE)) {
|
||||
fprintf(stderr,"File does not appear to be an Access database\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* loop over each entry in the catalog */
|
||||
|
||||
|
||||
@@ -65,7 +65,10 @@ int opt;
|
||||
|
||||
|
||||
/* read the catalog */
|
||||
mdb_read_catalog (mdb, MDB_TABLE);
|
||||
if (!mdb_read_catalog (mdb, MDB_TABLE)) {
|
||||
fprintf(stderr,"File does not appear to be an Access database\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* loop over each entry in the catalog */
|
||||
for (i=0; i < mdb->num_catalog; i++) {
|
||||
|
||||
Reference in New Issue
Block a user