Skip to content

Commit 797e17f

Browse files
committed
fixed an invalid access to files array
this was found by Calum Hutton from Rapid7. It is a real bug, but analysis shows it can't be leverged into an exploit. Worth fixing though. Many thanks to Calum and Rapid7 for finding and reporting this
1 parent c2db921 commit 797e17f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sender.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ void send_files(int f_in, int f_out)
262262

263263
if (ndx - cur_flist->ndx_start >= 0)
264264
file = cur_flist->files[ndx - cur_flist->ndx_start];
265+
else if (cur_flist->parent_ndx < 0)
266+
exit_cleanup(RERR_PROTOCOL);
265267
else
266268
file = dir_flist->files[cur_flist->parent_ndx];
267269
if (F_PATHNAME(file)) {

0 commit comments

Comments
 (0)