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
F174628789: D43532.id133511.diff
Sun, Oct 4, 7:10 PM
Unknown Object (File)
Sat, Oct 3, 11:13 AM
Unknown Object (File)
Fri, Oct 2, 6:33 PM
Unknown Object (File)
Fri, Oct 2, 5:15 PM
Unknown Object (File)
Fri, Oct 2, 4:07 PM
Unknown Object (File)
Wed, Sep 30, 8:23 PM
Unknown Object (File)
Mon, Sep 28, 7:15 PM
Unknown Object (File)
Sun, Sep 20, 4:57 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 55691
Build 52580: arc lint + arc unit

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