Preserved return value of iso_util_decode_md5_tag() until it is tested. Coverity CID 28711.
This commit is contained in:
parent
d7e6b734a0
commit
27208d995b
@ -2411,7 +2411,7 @@ int Xorriso__add_spot(struct xorriso_md5_state *state,
|
||||
int Xorriso_chunk_md5(struct XorrisO *xorriso, char *data, int to_read,
|
||||
uint32_t from_lba, struct xorriso_md5_state *state, int flag)
|
||||
{
|
||||
int j, ret= 0, valid, tag_type;
|
||||
int j, ret= 0, valid, tag_type, decode_ret= 0;
|
||||
uint32_t lba, pos, range_start, range_size;
|
||||
char md5[16], tag_md5[16], *tag_type_name= "", *comparison, *sev_text;
|
||||
void *cloned_ctx= NULL;
|
||||
@ -2420,13 +2420,14 @@ int Xorriso_chunk_md5(struct XorrisO *xorriso, char *data, int to_read,
|
||||
lba= j + from_lba;
|
||||
if(lba < state->md5_start)
|
||||
continue;
|
||||
ret= 0;
|
||||
ret= decode_ret= 0;
|
||||
if(lba > state->md5_start + 16 &&
|
||||
(state->next_tag == 0 || state->chain_broken || lba == state->next_tag)){
|
||||
ret= iso_util_decode_md5_tag(data + j * 2048, &tag_type,
|
||||
&pos, &range_start, &range_size,
|
||||
&(state->next_tag), tag_md5,
|
||||
!!state->chain_broken);
|
||||
decode_ret= ret;
|
||||
}
|
||||
valid= (ret == 1 || ret == (int) ISO_MD5_AREA_CORRUPTED) && pos == lba;
|
||||
if(valid && tag_type == 2 && (lba < state->md5_start + 32 ||
|
||||
@ -2480,7 +2481,7 @@ int Xorriso_chunk_md5(struct XorrisO *xorriso, char *data, int to_read,
|
||||
}
|
||||
iso_md5_end(&cloned_ctx, md5);
|
||||
|
||||
if(ret == (int) ISO_MD5_AREA_CORRUPTED) {
|
||||
if(decode_ret == (int) ISO_MD5_AREA_CORRUPTED) {
|
||||
comparison= "CORRUPTED";
|
||||
sev_text= "WARNING";
|
||||
state->md5_spot_value= Xorriso_read_quality_md5_mismatcH;
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2015.11.08.194419"
|
||||
#define Xorriso_timestamP "2015.11.08.200543"
|
||||
|
Loading…
Reference in New Issue
Block a user