diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 278170ce..272ac3f3 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2009.08.17.162834" +#define Xorriso_timestamP "2009.08.18.173453" diff --git a/xorriso/xorrisoburn.c b/xorriso/xorrisoburn.c index d03c48e3..f82bb7b2 100644 --- a/xorriso/xorrisoburn.c +++ b/xorriso/xorrisoburn.c @@ -938,6 +938,7 @@ int Xorriso_assert_volid(struct XorrisO *xorriso, int msc1, int flag) int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag) { int ret, hret, not_writeable= 0, has_what, aquire_flag, load_lba, ext; + int lba, track, session, params_flag, adr_mode, read_ret; uint32_t size; struct burn_drive_info *dinfo= NULL, *out_dinfo, *in_dinfo; struct burn_drive *drive, *out_drive, *in_drive; @@ -949,7 +950,6 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag) size_t value_length; char *value= NULL; double num; - int lba, track, session, params_flag, adr_mode; char volid[33], adr_data[163], *adr_pt; if((flag&3)==0) { @@ -1160,7 +1160,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag) goto ex; } - ret= isoburn_read_image(drive, ropts, &volset); + read_ret= ret= isoburn_read_image(drive, ropts, &volset); /* <<< Resetting to normal thresholds */ if(xorriso->img_read_error_mode>0) @@ -1175,9 +1175,16 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag) if(xorriso->img_read_error_mode==2) sev= "FATAL"; Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, sev, 0); - if(xorriso->img_read_error_mode!=0) - Xorriso_msgs_submit(xorriso, 0, "You might get a partial or altered ISO image tree by option -error_behavior 'image_loading' 'best_effort'", + if(read_ret == ISO_SB_TREE_CORRUPTED && (xorriso->do_md5 & 1)) { + Xorriso_msgs_submit(xorriso, 0, + "You might get a questionable ISO image tree by option -md5 'off'.", + 0, "HINT", 0); + } else if(xorriso->img_read_error_mode!=0) { + Xorriso_msgs_submit(xorriso, 0, "You might get a partial or altered ISO image tree by option -error_behavior 'image_loading' 'best_effort' if -abort_on is set to be tolerant enough.", 0, "HINT", 0); + } + + ret= 3; goto ex; } Xorriso_pacifier_callback(xorriso, "nodes read", xorriso->pacifier_count, 0, @@ -9203,7 +9210,7 @@ int Xorriso_check_interval(struct XorrisO *xorriso, struct SpotlisT *spotlist, int from_lba, int block_count, int read_chunk, int md5_start, int flag) { - int i, j, k, ret, total_count= 0, sectors= -1, sector_size= -1, skip_reading; + int i, j, ret, total_count= 0, sectors= -1, sector_size= -1, skip_reading; int prev_quality= -1, quality= -1, retry= 0, profile_no, is_cd= 0; int start_sec, end_sec, first_value, fret; char profile_name[80]; @@ -9445,15 +9452,12 @@ abort_check:; } iso_md5_end(&cloned_ctx, md5); - for(k= 0; k < 16; k++) - if(tag_md5[k] != md5[k]) - break; if(ret == ISO_MD5_AREA_CORRUPTED) { comparison= "CORRUPTED"; sev_text= "WARNING"; md5_spot_value= Xorriso_read_quality_md5_mismatcH; chain_broken= 1; - } else if(k < 16 ) { + } else if(! iso_md5_match(tag_md5, md5)) { comparison= "NON-MATCHING"; sev_text= "WARNING"; md5_spot_value= Xorriso_read_quality_md5_mismatcH; @@ -12292,7 +12296,7 @@ ex:; int Xorriso_check_md5(struct XorrisO *xorriso, void *in_node, char *path, int flag) { - int i, ret, wanted, rret; + int ret, wanted, rret; IsoImage *image; IsoNode *node; IsoFile *file; @@ -12361,10 +12365,7 @@ int Xorriso_check_md5(struct XorrisO *xorriso, void *in_node, char *path, goto ex; /* Report outcome */ - for(i= 0; i < 16; i++) - if(node_md5[i] != data_md5[i]) - break; - if(i < 16 ) { + if(! iso_md5_match(node_md5, data_md5)) { sprintf(xorriso->result_line, "MD5 MISMATCH: "); Text_shellsafe(path, xorriso->result_line, 1); strcat(xorriso->result_line, "\n"); @@ -12391,7 +12392,7 @@ ex:; int Xorriso_check_md5_range(struct XorrisO *xorriso, off_t start_lba, off_t end_lba, char md5[16], int flag) { - int ret, i; + int ret; struct burn_drive_info *dinfo= NULL; struct burn_drive *drive= NULL; off_t pos, data_count, to_read; @@ -12422,11 +12423,8 @@ int Xorriso_check_md5_range(struct XorrisO *xorriso, off_t start_lba, xorriso->pacifier_count, 0, "", 0); } iso_md5_end(&ctx, data_md5); - for(i= 0; i < 16; i++) - if(md5[i] != data_md5[i]) - break; ret= 1; - if(i < 16 ) + if(! iso_md5_match(md5, data_md5)) ret= 0; ex:; Xorriso_process_msg_queues(xorriso,0);