* util/grub-fstest.c: Remove variable length arrays.
This commit is contained in:
parent
d54f647a4a
commit
621e167fd6
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2013-11-29 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* util/grub-fstest.c: Remove variable length arrays.
|
||||
|
||||
2013-11-29 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/osdep/linux/ofpath.c: Check return value of read.
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue