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)
Mon, May 12, 10:19 AM
Unknown Object (File)
Tue, Apr 29, 11:10 PM
Unknown Object (File)
Sat, Apr 26, 5:02 PM
Unknown Object (File)
Sat, Apr 26, 4:44 PM
Unknown Object (File)
Sat, Apr 26, 3:18 PM
Unknown Object (File)
Sat, Apr 26, 1:07 PM
Unknown Object (File)
Sat, Apr 26, 12:57 PM
Unknown Object (File)
Apr 18 2025, 12:18 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