X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/c32edbe02eaf8ae9ed1bf6d766ab4f4c34881217..1e7098b5e345a736c9aca2ce114ce0c6cec8fd82:/log.c diff --git a/log.c b/log.c index 95fd96c0..9d915c39 100644 --- a/log.c +++ b/log.c @@ -376,7 +376,7 @@ static void log_formatted(enum logcode code, case 'f': pathjoin(buf2, sizeof buf2, am_sender && file->dir.root ? file->dir.root : "", - f_name(file)); + safe_fname(f_name(file))); clean_fname(buf2, 0); n = buf2; if (*n == '/') n++; @@ -418,7 +418,8 @@ static void log_formatted(enum logcode code, l = strlen(n); if (l + ((int)(s - &buf[0])) >= sizeof(buf)) { - rprintf(FERROR,"buffer overflow expanding %%%c -- exiting\n", + rprintf(FERROR, + "buffer overflow expanding %%%c -- exiting\n", p[0]); exit_cleanup(RERR_MESSAGEIO); } @@ -428,7 +429,7 @@ static void log_formatted(enum logcode code, memmove(s+(l-1), s+1, strlen(s+1)+1); } - /* Copy in n but NOT its nul, because the format sting + /* Copy in n but NOT its nul, because the format string * probably continues after this. */ memcpy(p, n, l);