]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2010-01-27 Vladimir Serbinenko <phcoder@gmail.com>
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 27 Jan 2010 15:29:21 +0000 (16:29 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 27 Jan 2010 15:29:21 +0000 (16:29 +0100)
* commands/hashsum.c (hash_file): Avoid possible stack overflow by
having a 4KiB and not 32KiB buffer size.

ChangeLog
commands/hashsum.c

index 60ce328bf00bcab404625a4424bd90438474526f..aceb55009b481013e3766020eeef0399862276dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>'.
index a4e71b84421fdac45cd8480665906572d1966359..951479fa72e756b6cd8693fe3b1a520f7b6308f9 100644 (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);