mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-06-28 15:39:02 +08:00
Fix infinite loop (See oss-fuzz/28789)
A loop is still possible with mutually referencing pages but eliminating self-references should fix the major timeouts
This commit is contained in:
parent
c0880f0e40
commit
7893a948ce
@ -411,6 +411,8 @@ int mdb_read_next_dpg(MdbTableDef *table)
|
||||
break; /* unknow map type: goto fallback */
|
||||
if (!next_pg)
|
||||
return 0;
|
||||
if ((guint32)next_pg == table->cur_phys_pg)
|
||||
return 0; /* Infinite loop */
|
||||
|
||||
if (!mdb_read_pg(mdb, next_pg)) {
|
||||
fprintf(stderr, "error: reading page %d failed.\n", next_pg);
|
||||
|
Loading…
Reference in New Issue
Block a user