|
|
|
@ -478,8 +478,8 @@ static int isoburn_inspect_partition(struct isoburn *o, uint32_t img_size,
|
|
|
|
|
{ret= 2; goto ex;} /* No room for volume descriptors */
|
|
|
|
|
offst/= 4;
|
|
|
|
|
numsec/= 4;
|
|
|
|
|
if(offst + numsec != img_size)
|
|
|
|
|
{ret= 2; goto ex;} /* Partition end does not match image end */
|
|
|
|
|
if(offst + numsec > img_size)
|
|
|
|
|
{ret= 2; goto ex;} /* Partition end exceeds image end */
|
|
|
|
|
|
|
|
|
|
/* Is there a PVD at the partition start ? */
|
|
|
|
|
ret = burn_read_data(o->drive, (off_t) (offst + 16) * (off_t) 2048,
|
|
|
|
@ -493,8 +493,8 @@ static int isoburn_inspect_partition(struct isoburn *o, uint32_t img_size,
|
|
|
|
|
|| pvm->file_structure_version[0] != 1 )
|
|
|
|
|
{ret= 2; goto ex;} /* failed sanity check */
|
|
|
|
|
|
|
|
|
|
if(iso_read_lsb(pvm->vol_space_size, 4) + offst != img_size)
|
|
|
|
|
{ret= 2; goto ex;} /* Image ends do not match */
|
|
|
|
|
if(iso_read_lsb(pvm->vol_space_size, 4) + offst > img_size)
|
|
|
|
|
{ret= 2; goto ex;} /* Image ends do not match plausibly */
|
|
|
|
|
|
|
|
|
|
/* Now it is credible. Not yet clear is whether it is acceptable. */
|
|
|
|
|
o->loaded_partition_offset= offst;
|
|
|
|
|