Made sure only legal ECMA-119 timestrings come from -report_system_area as_mkisofs
This commit is contained in:
parent
650c015c5b
commit
ea8a7591de
@ -1662,8 +1662,9 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
|
||||
struct FindjoB *job= NULL;
|
||||
struct stat dir_stbuf;
|
||||
IsoImage *image;
|
||||
char *volid, *crt, *mdt, *ext, *eft, uuid[17];
|
||||
char *volid, *crt, *mdt, *ext, *eft, uuid[17], *uuid_time;
|
||||
char **app_pseudo_paths= NULL;
|
||||
struct tm tm_erg;
|
||||
|
||||
struct mbr_par {
|
||||
uint8_t ptype;
|
||||
@ -1804,27 +1805,38 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
|
||||
Xorriso_record_cmd_linE
|
||||
ret= iso_image_get_pvd_times(image, &crt, &mdt, &ext, &eft);
|
||||
if(ret == ISO_SUCCESS) {
|
||||
if(mkisofs)
|
||||
sprintf(buf, "--modification-date=");
|
||||
else
|
||||
sprintf(buf, "-volume_date uuid ");
|
||||
uuid_time= crt;
|
||||
/* If Creation Time is bad and Modification Time is ok: use the latter */
|
||||
ret= Decode_ecma119_format(&tm_erg, crt, 0);
|
||||
if(ret <= 0 || strlen(crt) != 16) {
|
||||
ret= Decode_ecma119_format(&tm_erg, mdt, 0);
|
||||
if(!(ret <= 0 || strlen(mdt) != 16))
|
||||
uuid_time= mdt;
|
||||
}
|
||||
pad= 0;
|
||||
for(j= 0; j < 16; j++) {
|
||||
if(pad) {
|
||||
uuid[j]= '0';
|
||||
} else if(crt[j] == 0) {
|
||||
} else if(uuid_time[j] == 0) {
|
||||
pad= 1;
|
||||
uuid[j]= '0';
|
||||
} else if(crt[j] < '0' || crt[j] > '9') {
|
||||
} else if(uuid_time[j] < '0' || uuid_time[j] > '9') {
|
||||
uuid[j]= '0';
|
||||
} else {
|
||||
uuid[j]= crt[j];
|
||||
uuid[j]= uuid_time[j];
|
||||
}
|
||||
}
|
||||
uuid[16]= 0;
|
||||
Text_shellsafe(uuid, buf, 1);
|
||||
ret= Decode_ecma119_format(&tm_erg, uuid, 0);
|
||||
if(!(ret <= 0 || strlen(uuid) != 16)) {
|
||||
if(mkisofs)
|
||||
sprintf(buf, "--modification-date=");
|
||||
else
|
||||
sprintf(buf, "-volume_date uuid ");
|
||||
Text_shellsafe(uuid, buf, 1);
|
||||
Xorriso_record_cmd_linE
|
||||
}
|
||||
}
|
||||
Xorriso_record_cmd_linE
|
||||
|
||||
/* First pass: set up objects, record El Torito and info needed in 2nd pass */
|
||||
for(i= 0; i < line_count; i++) {
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2017.08.24.102427"
|
||||
#define Xorriso_timestamP "2017.09.09.142818"
|
||||
|
Loading…
Reference in New Issue
Block a user