path: root/src
authorSergey Poznyakoff <>2018-08-19 06:50:22 (GMT)
committer Sergey Poznyakoff <>2018-08-19 06:56:14 (GMT)
commit64ef7e827406f91d31bffdcad9f4b8aaad1f874c (patch) (side-by-side diff)
tree8eb3da77ef771507f07b68172e7af8cd3d8bd36c /src
parent4e23fa7b90b56408d480ba8c7556b190757ea2c7 (diff)
Fix directory entry validation.
Bug reported by Miroslav Lichvar and Marek Skalick√Ĺ * src/bucket.c (gdbm_dir_entry_valid_p): Fix lower limit for the allowed bucket address. Initial allocation of second block for the directory can be eventually returned to the available list when the directory is expanded during bucket splitting.
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bucket.c b/src/bucket.c
index 0597965..3d267e2 100644
--- a/src/bucket.c
+++ b/src/bucket.c
@@ -54,7 +54,7 @@ gdbm_dir_entry_valid_p (GDBM_FILE dbf, int dir_index)
return dir_index >= 0
&& dir_index < GDBM_DIR_COUNT (dbf)
- && dbf->dir[dir_index] >= 2*dbf->header->block_size;
+ && dbf->dir[dir_index] >= dbf->header->block_size;
/* Find a bucket for DBF that is pointed to by the bucket directory from

Return to:

Send suggestions and report system problems to the System administrator.