Bug fix: Mix of absolute and relative disk paths could cause SIGSEGV with pattern expansion

This commit is contained in:
Thomas Schmitt 2016-12-05 12:25:32 +01:00
parent b48c54c7ce
commit 9b75d21e2a
2 changed files with 5 additions and 3 deletions

View File

@ -649,7 +649,7 @@ int Xorriso_expand_disk_pattern(struct XorrisO *xorriso,
xorriso->structured_search= 1;
for(i= 0; i<num_patterns; i++) {
abs_adr= 0;
ret= Xorriso_prepare_expansion_pattern(xorriso, patterns[i], 4);
if(ret<=0)
goto ex;
@ -705,10 +705,12 @@ int Xorriso_expand_disk_pattern(struct XorrisO *xorriso,
/* now store addresses */
for(i= 0; i<num_patterns; i++) {
abs_adr= 0;
ret= Xorriso_prepare_expansion_pattern(xorriso, patterns[i], 4);
if(ret<=0)
goto ex;
if(ret == 2)
abs_adr= 4;
if(patterns[i][0]=='/' || abs_adr) {
strcpy(dir_adr, "/");

View File

@ -1 +1 @@
#define Xorriso_timestamP "2016.11.19.172243"
#define Xorriso_timestamP "2016.12.05.101546"