Bug in gbde(8) utility
Maxim Sobolev
sobomax at portaone.com
Thu Jun 24 08:35:41 PDT 2004
Hi Poul,
I am currently experimenting with your great GBDE module and found that
there apparently a bug in gbde(8) utility, particularly it can't handle
number of keys less than G_BDE_MAXKEYS, though documentation says that
it should. The problem is that around line 655 of gbde.c you are
initialising locations of unused lock sectors with random values without
performing any bounds checking, so that when later on around line 440
you are trying to lseek() to that location operation can fail due to
size of the disk being less than that random value. You can easily
reproduce the problem by trying invoking gbde with number_of_keys = 1,
random_bits() usually generates very huge numbers so that chances to hit
disk limit are quite high.
Please fix.
Thanks!
-Maxim
More information about the freebsd-current
mailing list