diff --git a/ChangeLog b/ChangeLog index 60ce328bf..aceb55009 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-01-27 Vladimir Serbinenko + + * commands/hashsum.c (hash_file): Avoid possible stack overflow by + having a 4KiB and not 32KiB buffer size. + 2010-01-27 Robert Millan * util/hostfs.c: Include `'. diff --git a/commands/hashsum.c b/commands/hashsum.c index a4e71b844..951479fa7 100644 --- a/commands/hashsum.c +++ b/commands/hashsum.c @@ -57,7 +57,7 @@ static grub_err_t hash_file (grub_file_t file, const gcry_md_spec_t *hash, void *result) { grub_uint8_t context[hash->contextsize]; - char *readbuf[4096]; + grub_uint8_t readbuf[4096]; grub_memset (context, 0, sizeof (context)); hash->init (context);