Prevented bug when interpreting MBR partition entry > 1 TB. Coverity CID 28764.

This commit is contained in:
Thomas Schmitt 2015-11-04 10:12:54 +00:00
parent 85424a0f31
commit 77639ca1cd
2 changed files with 5 additions and 3 deletions

View File

@ -455,8 +455,10 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, struct burn_drive *drive,
system_area_options= xorriso->patch_system_area;
/* Check whether partition 1 ends at image end */;
ub= (unsigned char *) buf;
hd_lba= (ub[454] | (ub[455] << 8) | (ub[456] << 16) | (ub[457] << 24)) +
(ub[458] | (ub[459] << 8) | (ub[460] << 16) | (ub[461] << 24));
hd_lba= (ub[454] | (ub[455] << 8) | (ub[456] << 16) |
(((unsigned int) ub[457]) << 24)) +
(ub[458] | (ub[459] << 8) | (ub[460] << 16) |
(((unsigned int) ub[461]) << 24));
iso_lba= -1;
ret= isoburn_disc_get_msc1(drive, &start_lba);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2015.11.04.094803"
#define Xorriso_timestamP "2015.11.04.100839"