* util/grub-fstest.c (cmd_cmp): Check that sizes match.
This commit is contained in:
parent
af869a4ab9
commit
8a3bc88ea7
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2011-04-11 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* util/grub-fstest.c (cmd_cmp): Check that sizes match.
|
||||
|
||||
2011-04-11 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* util/grub-fstest.c (read_file): Report GRUB error if file opening
|
||||
|
|
|
@ -222,6 +222,14 @@ cmd_cmp (char *src, char *dest)
|
|||
grub_util_error (_("seek error"));
|
||||
|
||||
read_file (src, cmp_hook);
|
||||
|
||||
{
|
||||
grub_uint64_t pre;
|
||||
pre = ftell (ff);
|
||||
fseek (ff, 0, SEEK_END);
|
||||
if (pre != ftell (ff))
|
||||
grub_util_error (_("unexpected end of file"));
|
||||
}
|
||||
fclose (ff);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue