X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/99f106d1cfe06f6696d649bcb3533b44cfb4f562..9dd891bb28f6cc558b87905f1adc5e3d4180b6b3:/log.c diff --git a/log.c b/log.c index 3b53a9ae..421829bd 100644 --- a/log.c +++ b/log.c @@ -466,7 +466,7 @@ static void log_formatted(enum logcode code, l = strlen(n); - if ((l-1) + ((int)(s - &buf[0])) > sizeof(buf)) { + if (l + ((int)(s - &buf[0])) >= sizeof(buf)) { rprintf(FERROR,"buffer overflow expanding %%%c - exiting\n", p[0]); exit_cleanup(RERR_MESSAGEIO);