Prevented rollover of El Torito Sector Count of large EFI boot images

This commit is contained in:
Thomas Schmitt 2013-03-12 19:47:05 +00:00
parent 161898b9f1
commit d87ba21f6d
2 changed files with 7 additions and 1 deletions

View File

@ -576,6 +576,12 @@ int Xorriso_attach_boot_image(struct XorrisO *xorriso, int flag)
{ret= 0; goto ex;}
}
el_torito_set_boot_platform_id(bootimg, (uint8_t) platform_id);
if(load_size / 512 > 65535) {
sprintf(xorriso->info_text,
"Boot image load size exceeds 65535 blocks. Will record 65535 in El Torito.");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
load_size= 65535 * 512;
}
el_torito_set_load_size(bootimg, load_size / 512);
el_torito_set_id_string(bootimg, xorriso->boot_id_string);
el_torito_set_selection_crit(bootimg, xorriso->boot_selection_crit);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2013.03.12.124913"
#define Xorriso_timestamP "2013.03.12.194637"