X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/13a1f7929ed05c652dc1b3eb4489ced01c8616f1..a0b65b1805e323ffb8b439d8cf2a2ba162503cfc:/exclude.c diff --git a/exclude.c b/exclude.c index a55b2f62..83c0b39b 100644 --- a/exclude.c +++ b/exclude.c @@ -24,8 +24,9 @@ #include "rsync.h" extern int verbose; +extern int am_server; -static char **exclude_list = NULL; +static char **exclude_list; static int is_regex(char *str) { @@ -86,7 +87,7 @@ void add_exclude_list(char *pattern,char ***list) if (strcmp(pattern,"!") == 0) { if (verbose > 2) - fprintf(FERROR,"clearing exclude list\n"); + fprintf(FINFO,"clearing exclude list\n"); while ((len)--) free((*list)[len]); free((*list)); @@ -104,7 +105,7 @@ void add_exclude_list(char *pattern,char ***list) out_of_memory("add_exclude"); if (verbose > 2) - fprintf(FERROR,"add_exclude(%s)\n",pattern); + fprintf(FINFO,"add_exclude(%s)\n",pattern); (*list)[len+1] = NULL; } @@ -163,9 +164,9 @@ void recv_exclude_list(int f) char line[MAXPATHLEN]; int l; while ((l=read_int(f))) { - read_buf(f,line,l); - line[l] = 0; - add_exclude(line); + if (l >= MAXPATHLEN) overflow("recv_exclude_list"); + read_sbuf(f,line,l); + add_exclude(line); } }