diff options
-rw-r--r-- | src/gdbmopen.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gdbmopen.c b/src/gdbmopen.c index fe2527e..42f429d 100644 --- a/src/gdbmopen.c +++ b/src/gdbmopen.c | |||
@@ -171,3 +171,9 @@ validate_header (gdbm_file_header const *hdr, struct stat const *st) | |||
171 | 171 | ||
172 | if (hdr->next_block != st->st_size) | 172 | /* Technically speaking, the condition below should read |
173 | hdr->next_block != st->st_size | ||
174 | However, gdbm versions prior to commit 4e819c98 could leave | ||
175 | hdr->next_block pointing beyond current end of file. To ensure | ||
176 | backward compatibility with these versions, the condition has been | ||
177 | slackened to this: */ | ||
178 | if (hdr->next_block < st->st_size) | ||
173 | result = GDBM_NEED_RECOVERY; | 179 | result = GDBM_NEED_RECOVERY; |