Bug fix: Multi-session emulation was not recognized with non-zero partition offset

此提交包含在:
2018-05-08 11:27:31 +02:00
父節點 e72ab34569
當前提交 198ecef0c4
共有 2 個檔案被更改,包括 5 行新增5 行删除

查看文件

@ -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;