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
Added --disable-iconv-open option for configure to turn off all use
[rsync/rsync.git]
/
flist.c
diff --git
a/flist.c
b/flist.c
index
2e449c0
..
0fc7851
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 (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;
} else {
symlink_name = NULL;
symlink_len = 0;
@@
-1915,7
+1923,7
@@
void send_extra_file_list(int f, int at_least)
write_byte(f, 0);
else {
write_shortint(f, XMIT_EXTENDED_FLAGS|XMIT_IO_ERROR_ENDLIST);
write_byte(f, 0);
else {
write_shortint(f, XMIT_EXTENDED_FLAGS|XMIT_IO_ERROR_ENDLIST);
- write_int(f, io_error);
+ write_
var
int(f, io_error);
}
if (need_unsorted_flist) {
}
if (need_unsorted_flist) {
@@
-2218,7
+2226,7
@@
struct file_list *send_file_list(int f, int argc, char *argv[])
write_byte(f, 0);
else {
write_shortint(f, XMIT_EXTENDED_FLAGS|XMIT_IO_ERROR_ENDLIST);
write_byte(f, 0);
else {
write_shortint(f, XMIT_EXTENDED_FLAGS|XMIT_IO_ERROR_ENDLIST);
- write_int(f, io_error);
+ write_
var
int(f, io_error);
}
#ifdef SUPPORT_HARD_LINKS
}
#ifdef SUPPORT_HARD_LINKS
@@
-2254,6
+2262,8
@@
struct file_list *send_file_list(int f, int argc, char *argv[])
if (numeric_ids <= 0 && !inc_recurse)
send_id_list(f);
if (numeric_ids <= 0 && !inc_recurse)
send_id_list(f);
+ set_msg_fd_in(-1);
+
/* send the io_error flag */
if (protocol_version < 30)
write_int(f, ignore_errors ? 0 : io_error);
/* send the io_error flag */
if (protocol_version < 30)
write_int(f, ignore_errors ? 0 : io_error);
@@
-2341,7
+2351,7
@@
struct file_list *recv_file_list(int f)
rprintf(FERROR, "Invalid flist flag: %x\n", flags);
exit_cleanup(RERR_PROTOCOL);
}
rprintf(FERROR, "Invalid flist flag: %x\n", flags);
exit_cleanup(RERR_PROTOCOL);
}
- err = read_int(f);
+ err = read_
var
int(f);
if (!ignore_errors)
io_error |= err;
break;
if (!ignore_errors)
io_error |= err;
break;