Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
A bug-fix for die_on_unsafe_path() when the path doesn't exist.
[rsync/rsync.git]
/
util.c
diff --git
a/util.c
b/util.c
index
d8d396c
..
afff767
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-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)) {