From 16acbe7f1dccd7754a3fb5ca152689b5aace0795 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 12 Aug 2015 09:12:04 +0000 Subject: [PATCH] Avoiding to hand out indigestible --modification-date with -report_el_torito --- xorriso/iso_img.c | 16 ++++++++++++++-- xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/xorriso/iso_img.c b/xorriso/iso_img.c index 47170547..6926f33e 100644 --- a/xorriso/iso_img.c +++ b/xorriso/iso_img.c @@ -1568,7 +1568,7 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso, char **cmds, int *cmd_count, int flag) { int ret= 0, i, num_count, mkisofs, line_count, idx, et_idx, isohybrid= 0; - int ptype, gpt_idx; + int ptype, gpt_idx, j, pad; int efi_boot_part= 0, full_sparc_part= 0, have_sparc_part= 0; int appended_as_gpt= 0, have_prep= 0, did_sysarea= 0, cared_for_apm= 0; int cared_for_sparc= 0, have_hfsplus= 0; @@ -1704,7 +1704,19 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso, sprintf(buf, "--modification-date="); else sprintf(buf, "-volume_date uuid "); - strncpy(uuid, crt, 16); + pad= 0; + for(j= 0; j < 16; j++) { + if(pad) { + uuid[j]= '0'; + } else if(crt[j] == 0) { + pad= 1; + uuid[j]= '0'; + } else if(crt[j] < '0' || crt[j] > '9') { + uuid[j]= '0'; + } else { + uuid[j]= crt[j]; + } + } uuid[16]= 0; Text_shellsafe(uuid, buf, 1); } diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index bb667073..be20b872 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2015.07.31.171227" +#define Xorriso_timestamP "2015.08.12.091220"