Fixed a potential SIGSEGV by pointer offset -1. Detected by valgrind.

This commit is contained in:
Thomas Schmitt 2010-10-05 18:00:52 +00:00
parent 375fee85da
commit cc6d2cd7e9
2 changed files with 5 additions and 3 deletions

View File

@ -304,8 +304,10 @@ cannot_open_dir:;
name= disk_path+strlen(disk_path);
if(Sfile_str(img_path, img_dir_path, 0)<=0)
{ret= -1; goto ex;}
if(img_path[0] || img_path[strlen(img_path)-1]!='/')
strcat(img_path,"/");
if(img_path[0] == 0)
strcat(img_path, "/");
else if(img_path[strlen(img_path) - 1] != '/')
strcat(img_path, "/");
img_name= img_path+strlen(img_path);
while(1) { /* loop over directory content */

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.10.04.155226"
#define Xorriso_timestamP "2010.10.05.180016"