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
F102680263: D43532.id133511.diff
Fri, Nov 15, 6:57 PM
Unknown Object (File)
Oct 7 2024, 9:40 PM
Unknown Object (File)
Oct 7 2024, 9:40 PM
Unknown Object (File)
Oct 7 2024, 9:38 PM
Unknown Object (File)
Oct 7 2024, 9:38 PM
Unknown Object (File)
Oct 7 2024, 9:38 PM
Unknown Object (File)
Oct 7 2024, 9:15 PM
Unknown Object (File)
Oct 2 2024, 8:28 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