From: Vladimir Serbinenko Date: Fri, 29 Nov 2013 04:50:32 +0000 (+0100) Subject: * util/grub-fstest.c: Remove variable length arrays. X-Git-Tag: grub-2.02-beta1~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=621e167fd636028d8d40a78ada65cc149da1b8de;p=thirdparty%2Fgrub.git * util/grub-fstest.c: Remove variable length arrays. --- diff --git a/ChangeLog b/ChangeLog index 511f3febd..472e74b59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-11-29 Vladimir Serbinenko + + * util/grub-fstest.c: Remove variable length arrays. + 2013-11-29 Vladimir Serbinenko * grub-core/osdep/linux/ofpath.c: Check return value of read. diff --git a/util/grub-fstest.c b/util/grub-fstest.c index 802733963..ee5880c50 100644 --- a/util/grub-fstest.c +++ b/util/grub-fstest.c @@ -344,13 +344,14 @@ crc_hook (grub_off_t ofs, char *buf, int len, void *crc_ctx) static void cmd_crc (char *pathname) { - grub_uint8_t crc32_context[GRUB_MD_CRC32->contextsize]; + grub_uint8_t *crc32_context = xmalloc (GRUB_MD_CRC32->contextsize); GRUB_MD_CRC32->init(crc32_context); read_file (pathname, crc_hook, crc32_context); GRUB_MD_CRC32->final(crc32_context); printf ("%08x\n", grub_be_to_cpu32 (grub_get_unaligned32 (GRUB_MD_CRC32->read (crc32_context)))); + free (crc32_context); } static const char *root = NULL;