...
 
......@@ -675,22 +675,22 @@ int isoburn_invalidate_iso(struct isoburn *o, int flag)
/*
* replace CD001 with CDXX1 in PVM.
*/
strncpy(head + 16 * 2048 + 1, "CDXX1", 5);
memcpy(head + 16 * 2048 + 1, "CDXX1", 5);
/* Invalidate further ECMA-119 volume descriptors and possible UDF volume
recognition sequence */
for(i= 17 * 2048; i < 32 * 2048; i+= 2048) {
if(end_ed_found) {
if(head[i] == 0 && strncmp(head + i + 1, "BEA01", 5) == 0)
strncpy(head + i + 1, "BEAX1", 5);
memcpy(head + i + 1, "BEAX1", 5);
else if(head[i] == 0 && strncmp(head + i + 1, "NSR", 3) == 0)
strncpy(head + i + 1, "NSRX", 4);
memcpy(head + i + 1, "NSRX", 4);
else if(head[i] == 0 && strncmp(head + i + 1, "TEA", 3) == 0)
strncpy(head + i + 1, "TEAX", 4);
memcpy(head + i + 1, "TEAX", 4);
} else if(strncmp(head + i + 1, "CD001", 5) == 0) {
if(((unsigned char *) head)[i] == 0xff)
end_ed_found= 1;
strncpy(head + i + 3, "XX", 2);
memcpy(head + i + 3, "XX", 2);
}
}
......
......@@ -1034,8 +1034,7 @@ int Xorriso_genisofs_hide_list(struct XorrisO *xorriso, char *whom,
}
ret= 1;
ex:;
if(flag & 1)
Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv, 2);
Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv, 2);
if(fp != NULL && fp != stdin)
fclose(fp);
if(ret<=0)
......
......@@ -365,7 +365,7 @@ int Xorriso_add_tree(struct XorrisO *xorriso, IsoDir *dir,
char *name, *img_name, *srcpt, *stbuf_src= "";
struct stat stbuf, hstbuf;
dev_t dir_dev;
struct LinkiteM *own_link_stack;
struct LinkiteM *own_link_stack = NULL;
char *sfe= NULL, *sfe2= NULL;
char *disk_path= NULL, *img_path= NULL, *link_target= NULL;
......
......@@ -847,6 +847,14 @@ treatment_patch:;
xorriso->boot_efi_default= 0;
} else if(strncmp(treatpt, "bin_path=", 9) == 0) {
if(strncmp(treatpt + 9, "--interval:appended_partition_", 30) == 0) {
if(strlen(treatpt + 9) >= sizeof(xorriso->boot_image_bin_path)) {
interval_text_long:;
sprintf(xorriso->info_text,
"-boot_image: --interval text is much too long (%d)",
(int) strlen(treatpt + 9));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 0; goto ex;
}
strcpy(xorriso->boot_image_bin_path, treatpt + 9);
} else {
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 9,
......@@ -871,6 +879,8 @@ treatment_patch:;
xorriso->boot_efi_default= 0;
} else if(strncmp(treatpt, "efi_path=", 9) == 0) {
if(strncmp(treatpt + 9, "--interval:appended_partition_", 30) == 0) {
if(strlen(treatpt + 9) >= sizeof(xorriso->boot_image_bin_path))
goto interval_text_long;
strcpy(xorriso->boot_image_bin_path, treatpt + 9);
} else {
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, treatpt + 9,
......
......@@ -1390,15 +1390,15 @@ ex:;
if(deleter && !(flag&2))
Xorriso_pacifier_callback(xorriso, "iso_rr_paths deleted",
xorriso->pacifier_count, 0, "", 1|2);
else if(first_job->action == 28 && !(flag&2))
else if(first_job != NULL && first_job->action == 28 && !(flag&2))
Xorriso_pacifier_callback(xorriso, "file filters processed",
xorriso->pacifier_count, 0, "", 1 | 2);
else if(mem_lut!=xorriso->last_update_time && mem_lut!=0.0 && !(flag&2))
Xorriso_pacifier_callback(xorriso, "content bytes read",
xorriso->pacifier_count, 0, "", 1 | 8 | 32);
if(first_job->action == 35 && !(flag & 1))
if(first_job != NULL && first_job->action == 35 && !(flag & 1))
Xorriso_report_md5_outcome(xorriso, first_job->target, 0);
if(first_job->action == 40) {
if(first_job != NULL && first_job->action == 40) {
sprintf(xorriso->result_line,"Size lower : %lus\n",
(unsigned long) (first_job->estim_lower_size / (off_t) 2048));
Xorriso_result(xorriso,0);
......
......@@ -218,8 +218,7 @@ ex:;
xorriso->allow_graft_points= allow_graft_points_mem;
Sfile_make_argv("", "", &argc, &argv, 2);
Xorriso_free_meM(pathspec);
if(flag & 1)
Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv, 2);
Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv, 2);
if(fp != NULL && fp != stdin)
fclose(fp);
......
......@@ -97,7 +97,7 @@ int Xorriso_opt_args(struct XorrisO *xorriso, char *cmd,
else
do_expand= (xorriso->do_iso_rr_pattern==1 && !(flag&4)) || (flag & 512);
if(flag&256) {
if(*optv < argv || (*optv >= argv + argc && argc > 0))
if(argv == NULL || *optv < argv || (*optv >= argv + argc && argc > 0))
Sfile_destroy_argv(optc, optv, 0);
return(1);
}
......
......@@ -725,8 +725,11 @@ int Xorriso_read_lines(struct XorrisO *xorriso, FILE *fp, int *linecount,
if(*argv == NULL)
{ret= -1; goto ex;}
(*argv)[0]= strdup(line);
if((*argv)[0] == NULL)
if((*argv)[0] == NULL) {
free(*argv);
(*argv)= NULL;
{ret= -1; goto ex;}
}
*argc= 1;
}
ret= 1;
......
#define Xorriso_timestamP "2019.08.12.190808"
#define Xorriso_timestamP "2019.08.14.144754"