A bug-fix for die_on_unsafe_path() when the path doesn't exist.

This commit is contained in:
Wayne Davison committed 2006-10-07 14:19:00 +00:00
1 parent 6c8507724b
commit 6ce9432d75
1 file changed
+2 -1
+2 -1
View File
@@ -922,7 +922,8 @@ void die_on_unsafe_path(char *path, int strip_filename)
if ((p = strchr(p, '/')) != NULL)
*p = '\0';
if (safe_stat(path, &st) < 0) {
*p++ = '/';
if (p)
*p = '/';
goto done;
}
if (S_ISLNK(st.st_mode)) {