- Check for integer overflow when receiving file sizes.
- Check for buffer overflow when receiving file names, and fully validate the names.
- Check for integer overflow when checking for available disk space.
- Check for I/O errors when sending status codes.
- Enforce one job per connection and one control file per job (see code comments for additional details).
- Simplify readfile(), avoiding constructs vulnerable to integer overflow.
- Don't delete files we didn't create.
- Rename read_number() to read_minfree() since that's all it's used for, and move all the minfree logic into it.
- Fix a few style issues.
PR: 293278
MFC after: 3 days