2010-01-27 Vladimir Serbinenko <phcoder@gmail.com>

* commands/hashsum.c (hash_file): Avoid possible stack overflow by
	having a 4KiB and not 32KiB buffer size.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-01-27 16:29:21 +01:00
parent 27dea7eda4
commit e709ebe2ef
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-01-27 Vladimir Serbinenko <phcoder@gmail.com>
* commands/hashsum.c (hash_file): Avoid possible stack overflow by
having a 4KiB and not 32KiB buffer size.
2010-01-27 Robert Millan <rmh.grub@aybabtu.com>
* util/hostfs.c: Include `<errno.h>'.

View File

@ -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);