diff --git a/ChangeLog b/ChangeLog index 03a57d538..75683b8d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-24 Robert Millan + + * util/mkisofs/write.c (padblock_write): Abort when given an + excedingly large embed image, instead of silently truncating it. + 2009-12-24 Robert Millan * include/multiboot.h: Indentation fixes. diff --git a/util/mkisofs/write.c b/util/mkisofs/write.c index 69b6bb623..896e2833b 100644 --- a/util/mkisofs/write.c +++ b/util/mkisofs/write.c @@ -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)