]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
authorRobert Millan <rmh@aybabtu.com>
Thu, 24 Dec 2009 18:00:48 +0000 (18:00 +0000)
committerRobert Millan <rmh@aybabtu.com>
Thu, 24 Dec 2009 18:00:48 +0000 (18:00 +0000)
* util/mkisofs/write.c (padblock_write): Abort when given an
excedingly large embed image, instead of silently truncating it.

ChangeLog
util/mkisofs/write.c

index 03a57d53869d0381507edba12217aada936b2de2..75683b8d5bbaeb977192c432fe02882186cae245 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-24  Robert Millan  <rmh.grub@aybabtu.com>
+
+       * util/mkisofs/write.c (padblock_write): Abort when given an
+       excedingly large embed image, instead of silently truncating it.
+
 2009-12-24  Robert Millan  <rmh.grub@aybabtu.com>
 
        * include/multiboot.h: Indentation fixes.
index 69b6bb6238705b2c4ea83a5e96e3cb374e1ec42e..896e2833bb56d160960be9d1c89d8879d5dfe15c 100644 (file)
@@ -1436,7 +1436,10 @@ static int FDECL1(padblock_write, FILE *, outfile)
       FILE *fp = fopen (boot_image_embed, "rb");
       if (! fp)
        error (1, errno, _("Unable to open %s"), boot_image_embed);
+
       fread (buffer, 2048 * PADBLOCK_SIZE, 1, fp);
+      if (fgetc (fp) != EOF)
+       error (1, 0, _("%s is too big for embed area"), boot_image_embed);
     }
 
   if (use_protective_msdos_label)