summaryrefslogtreecommitdiffabout
path: root/src/gdbmopen.c
Side-by-side diff
Diffstat (limited to 'src/gdbmopen.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/gdbmopen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gdbmopen.c b/src/gdbmopen.c
index 5d59f65..b84ad63 100644
--- a/src/gdbmopen.c
+++ b/src/gdbmopen.c
@@ -108,6 +108,10 @@ validate_header (gdbm_file_header const *hdr, struct stat const *st)
if (hdr->bucket_elems != bucket_element_count (hdr))
return GDBM_BAD_HEADER;
+
+ /* Validate the avail block */
+ if (!gdbm_avail_block_valid_p (&hdr->avail))
+ return GDBM_BAD_HEADER;
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.