rockridge_read.c (xorriso-1.5.2) | : | rockridge_read.c (xorriso-1.5.4) | ||
---|---|---|---|---|
skipping to change at line 617 | skipping to change at line 617 | |||
/* Append sue payload */ | /* Append sue payload */ | |||
memcpy(aapt + 5, sue->data.AL.comps, sue->len_sue[0] - 5); | memcpy(aapt + 5, sue->data.AL.comps, sue->len_sue[0] - 5); | |||
*is_done = !(sue->data.AL.flags[0] & 1); | *is_done = !(sue->data.AL.flags[0] & 1); | |||
*aa_len += sue->len_sue[0]; | *aa_len += sue->len_sue[0]; | |||
return ISO_SUCCESS; | return ISO_SUCCESS; | |||
} | } | |||
/** | /** | |||
* Reads the zisofs parameters from a ZF field (see doc/zisofs_format.txt). | * Reads the zisofs parameters from a ZF field (see doc/zisofs_format.txt | |||
* and doc/zisofs2_format.txt). | ||||
* | * | |||
* @return | * @return | |||
* 1 on success, < 0 on error | * 1 on success, < 0 on error | |||
*/ | */ | |||
int read_zisofs_ZF(struct susp_sys_user_entry *zf, uint8_t algorithm[2], | int read_zisofs_ZF(struct susp_sys_user_entry *zf, uint8_t algorithm[2], | |||
uint8_t *header_size_div4, uint8_t *block_size_log2, | uint8_t *header_size_div4, uint8_t *block_size_log2, | |||
uint32_t *uncompressed_size, int flag) | uint64_t *uncompressed_size, int flag) | |||
{ | { | |||
if (zf == NULL) { | if (zf == NULL) { | |||
return ISO_NULL_POINTER; | return ISO_NULL_POINTER; | |||
} | } | |||
if (zf->sig[0] != 'Z' || zf->sig[1] != 'F') { | if ((zf->sig[0] != 'Z' || zf->sig[1] != 'F') && | |||
(zf->sig[0] != 'Z' || zf->sig[1] != '2')) | ||||
return ISO_WRONG_ARG_VALUE; | return ISO_WRONG_ARG_VALUE; | |||
} | ||||
if (zf->len_sue[0] != 16) { | if (zf->len_sue[0] != 16) { | |||
return ISO_WRONG_RR; | return ISO_WRONG_RR; | |||
} | } | |||
if (zf->version[0] > 2) | ||||
return ISO_WRONG_RR; | ||||
algorithm[0] = zf->data.ZF.parameters[0]; | algorithm[0] = zf->data.ZF.parameters[0]; | |||
algorithm[1] = zf->data.ZF.parameters[1]; | algorithm[1] = zf->data.ZF.parameters[1]; | |||
*header_size_div4 = zf->data.ZF.parameters[2]; | *header_size_div4 = zf->data.ZF.parameters[2]; | |||
*block_size_log2 = zf->data.ZF.parameters[3]; | *block_size_log2 = zf->data.ZF.parameters[3]; | |||
*uncompressed_size = iso_read_bb(&(zf->data.ZF.parameters[4]), 4, NULL); | if (zf->version[0] == 1) | |||
*uncompressed_size = iso_read_bb(&(zf->data.ZF.parameters[4]), 4, | ||||
NULL); | ||||
else | ||||
*uncompressed_size = iso_read_lsb64(&(zf->data.ZF.parameters[4])); | ||||
return ISO_SUCCESS; | return ISO_SUCCESS; | |||
} | } | |||
End of changes. 6 change blocks. | ||||
5 lines changed or deleted | 12 lines changed or added |