diff options
| author | Wayne Davison <wayned@samba.org> | 2006-10-07 14:19:00 +0000 |
|---|---|---|
| committer | Wayne Davison <wayned@samba.org> | 2006-10-07 14:19:00 +0000 |
| commit | 6ce9432d755104c8fb6afe82ddcdfc905d498da7 (patch) | |
| tree | a977dda94c2a4b5590ff8041578ef0e4920fd8b3 /util.c | |
| parent | 6c8507724b4c7f3e4eb93cecc1ff816c2d3714f1 (diff) | |
| download | android_external_rsync-6ce9432d755104c8fb6afe82ddcdfc905d498da7.tar.gz android_external_rsync-6ce9432d755104c8fb6afe82ddcdfc905d498da7.tar.bz2 android_external_rsync-6ce9432d755104c8fb6afe82ddcdfc905d498da7.zip | |
A bug-fix for die_on_unsafe_path() when the path doesn't exist.
Diffstat (limited to 'util.c')
| -rw-r--r-- | util.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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)) { |
