From: Vladimir 'phcoder' Serbinenko Date: Mon, 11 Apr 2011 05:41:59 +0000 (+0200) Subject: * util/grub-fstest.c (cmd_cmp): Check that sizes match. X-Git-Tag: 1.99~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a3bc88ea740221ae56afdd1545327f45280f112;p=thirdparty%2Fgrub.git * util/grub-fstest.c (cmd_cmp): Check that sizes match. --- diff --git a/ChangeLog b/ChangeLog index cbb77c14c..dbcbb9651 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-04-11 Vladimir Serbinenko + + * util/grub-fstest.c (cmd_cmp): Check that sizes match. + 2011-04-11 Vladimir Serbinenko * util/grub-fstest.c (read_file): Report GRUB error if file opening diff --git a/util/grub-fstest.c b/util/grub-fstest.c index 51c1a3a52..293bdf74a 100644 --- a/util/grub-fstest.c +++ b/util/grub-fstest.c @@ -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); }