diff options
| author | Wayne Davison <wayned@samba.org> | 2006-10-13 23:17:30 +0000 |
|---|---|---|
| committer | Wayne Davison <wayned@samba.org> | 2006-10-13 23:17:30 +0000 |
| commit | deee574b1198a2886369f4ecbfbeaa6f851bb41d (patch) | |
| tree | a3a99b7abdbcdbde2b44d296e8a102b61043f488 /flist.c | |
| parent | 55410368e51074c167154689de0236c05df1ce6c (diff) | |
| download | android_external_rsync-deee574b1198a2886369f4ecbfbeaa6f851bb41d.tar.gz android_external_rsync-deee574b1198a2886369f4ecbfbeaa6f851bb41d.tar.bz2 android_external_rsync-deee574b1198a2886369f4ecbfbeaa6f851bb41d.zip | |
Added a paranoid length check.
Diffstat (limited to 'flist.c')
| -rw-r--r-- | flist.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |
