git.samba.org
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc6fb11
)
Do not try to send a symlink with a 0-length value.
author
Wayne Davison
<wayned@samba.org>
Wed, 4 Feb 2009 15:53:35 +0000
(07:53 -0800)
committer
Wayne Davison
<wayned@samba.org>
Thu, 5 Feb 2009 02:13:09 +0000
(18:13 -0800)
This avoids a transfer error in the receiver.
flist.c
patch
|
blob
|
history
diff --git
a/flist.c
b/flist.c
index 3e79ce104d05935b646e29da1b3d5e54869e2c14..1fa2cac8327ba9d6e6c8537cf576441a1d0eefb8 100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-1385,6
+1385,14
@@
static struct file_struct *send_file_name(int f, struct file_list *flist,
if (preserve_links && S_ISLNK(file->mode)) {
symlink_name = F_SYMLINK(file);
symlink_len = strlen(symlink_name);
+ if (symlink_len == 0) {
+ io_error |= IOERR_GENERAL;
+ f_name(file, fbuf);
+ rprintf(FERROR_XFER,
+ "skipping symlink with 0-length value: %s\n",
+ full_fname(fbuf));
+ return NULL;
+ }
} else {
symlink_name = NULL;
symlink_len = 0;