qrexec-lib: check files limit before processing the file

Off-by-one error.
This commit is contained in:
Marek Marczykowski-Górecki 2013-11-13 10:35:23 +01:00
parent 05092fb3e6
commit 761305bc8b

View File

@ -156,10 +156,10 @@ int do_unpack()
errno = 0; errno = 0;
break; break;
} }
process_one_file(&untrusted_hdr);
total_files++; total_files++;
if (files_limit && total_files > files_limit) if (files_limit && total_files > files_limit)
do_exit(EDQUOT, untrusted_namebuf); do_exit(EDQUOT, untrusted_namebuf);
process_one_file(&untrusted_hdr);
} }
send_status_and_crc(errno, untrusted_namebuf); send_status_and_crc(errno, untrusted_namebuf);
return errno; return errno;