mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-27 17:49:23 +00:00
io/gzio: Properly init a table
ARRAY_SIZE() is the count of elements, but the element size is 4 bytes, so this was only initing the first 1/4th of the table. Detected with valgrind. This should only matter in error paths, and I've not been able to identify any actual misbehaviour that results from reading in-bounds but uninited data. Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
243682baaa
commit
c806e4dc88
1 file changed
+1
-1
+1
-1
@@ -524,7 +524,7 @@ huft_build (unsigned *b, /* code lengths in bits (all assumed <= BMAX) */
|
||||
}
|
||||
|
||||
/* Make a table of values in order of bit lengths */
|
||||
grub_memset (v, N_MAX, ARRAY_SIZE (v));
|
||||
grub_memset (v, N_MAX, sizeof (v));
|
||||
p = b;
|
||||
i = 0;
|
||||
do
|
||||
|
||||
Reference in new issue
Block a user