Page MenuHomeFreeBSD

bintrans: Error out if writing to the output failed.
ClosedPublic

Authored by des on Jan 21 2024, 5:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 18, 1:42 PM
Unknown Object (File)
Thu, May 9, 9:17 PM
Unknown Object (File)
Thu, May 9, 3:38 PM
Unknown Object (File)
Thu, May 9, 5:49 AM
Unknown Object (File)
Apr 23 2024, 11:33 AM
Unknown Object (File)
Apr 23 2024, 11:30 AM
Unknown Object (File)
Apr 23 2024, 11:30 AM
Unknown Object (File)
Apr 23 2024, 11:30 AM
Subscribers

Details

Summary
  • Cover all code paths.
  • When decoding, check all output files, not just the last one.
  • A simple ferror() check is not enough as an error may later occur while flushing whatever remains in the output buffer.

MFC after: 1 week
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Jan 21 2024, 5:37 PM

This needs a little more work as base64_decode() may return early.

fix decode cases correctly

allanjude added a subscriber: allanjude.

Reviewed-by: allanjude

This revision is now accepted and ready to land.Jan 31 2024, 2:40 PM