Fix bug #140, related to isolinux size, following patch by Christian Ostheimer.
We had assumed isolinux images are always a multiple of 4 bytes. However, this does not happens with recent isolinux images.
This commit is contained in:
parent
33e058a66a
commit
e79ee64a2f
@ -807,9 +807,12 @@ int patch_boot_image(uint8_t *buf, Ecma119Image *t, size_t imgsize)
|
||||
offset += 4;
|
||||
}
|
||||
if (offset != imgsize) {
|
||||
/* file length not multiple of 4 */
|
||||
return iso_msg_submit(t->image->id, ISO_ISOLINUX_CANT_PATCH, 0,
|
||||
"Unexpected isolinux image length. Patch might not work.");
|
||||
/*
|
||||
* file length not multiple of 4
|
||||
* empty space in isofs is padded with zero;
|
||||
* assume same for last dword
|
||||
*/
|
||||
checksum += iso_read_lsb(buf + offset, imgsize - offset);
|
||||
}
|
||||
|
||||
/* patch boot info table */
|
||||
|
Loading…
Reference in New Issue
Block a user