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.
This commit is contained in:
Robert Millan 2009-12-24 18:00:48 +00:00
parent d14d33704e
commit 401c0ad6fd
2 changed files with 8 additions and 0 deletions

View file

@ -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.

View 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)