From: Wayne Davison Date: Fri, 13 Oct 2006 23:17:30 +0000 (+0000) Subject: Added a paranoid length check. X-Git-Tag: v2.6.9pre2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=deee574b1198a2886369f4ecbfbeaa6f851bb41d;p=thirdparty%2Frsync.git Added a paranoid length check. --- diff --git a/flist.c b/flist.c index 7e4eef55..e8043c57 100644 --- a/flist.c +++ b/flist.c @@ -1228,8 +1228,11 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) } } - if (fn != fbuf) + if (fn != fbuf) { + if (len >= MAXPATHLEN) + overflow_exit("send_file_list"); memmove(fbuf, fn, len + 1); + } if (implied_dirs && (p=strrchr(fbuf,'/')) && p != fbuf) { /* Send the implied directories at the start of the