From: Stefan Behrens Date: Tue, 21 Apr 2015 11:50:38 +0000 (+0200) Subject: rsync: fix of-by-one in check of snprintf() result. X-Git-Tag: v3.1.2pre1~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3ea74eb3880b4fda95fced4f605bb96f19dd4b0f;p=thirdparty%2Frsync.git rsync: fix of-by-one in check of snprintf() result. Fixes bug 11229. --- diff --git a/io.c b/io.c index a868fa9c..01c6db17 100644 --- a/io.c +++ b/io.c @@ -2283,7 +2283,7 @@ void io_printf(int fd, const char *format, ...) if (len < 0) exit_cleanup(RERR_PROTOCOL); - if (len > (int)sizeof buf) { + if (len >= (int)sizeof buf) { rprintf(FERROR, "io_printf() was too long for the buffer.\n"); exit_cleanup(RERR_PROTOCOL); }