Bug fix: -disk_pattern on -add "" -- yielded SIGSEGV

This commit is contained in:
Thomas Schmitt 2019-09-01 09:25:03 +02:00
parent 7066fd4e2f
commit 8828d6f465
2 changed files with 3 additions and 2 deletions

View File

@ -121,6 +121,7 @@ int Xorriso_opt_args(struct XorrisO *xorriso, char *cmd,
*optc= *end_idx - idx;
*optv= NULL;
if(*optc<=0 || !do_expand) {
copy_args:;
if(*optc > 0) {
Xorriso_alloc_meM(*optv, char *, *optc);
for(i= 0; i < *optc; i++) {
@ -153,7 +154,7 @@ no_memory:;
}
if(nump<=0) { /* Only empty texts. May the caller get happy with them. */
free(patterns);
return(1);
goto copy_args;
}
if(flag&2)
ret= Xorriso_expand_disk_pattern(xorriso, nump, patterns, was_empty,

View File

@ -1 +1 @@
#define Xorriso_timestamP "2019.09.01.071948"
#define Xorriso_timestamP "2019.09.01.072438"