Page MenuHomeFreeBSD

uncompress: Avoid reading an extra byte
ClosedPublic

Authored by imp on Oct 10 2024, 5:02 PM.
Tags
None
Referenced Files
F115859731: D47041.diff
Tue, Apr 29, 4:24 PM
Unknown Object (File)
Sun, Apr 20, 12:30 PM
Unknown Object (File)
Jan 29 2025, 6:53 AM
Unknown Object (File)
Jan 22 2025, 6:19 PM
Unknown Object (File)
Jan 17 2025, 4:20 PM
Unknown Object (File)
Jan 15 2025, 7:03 PM
Unknown Object (File)
Jan 15 2025, 7:01 PM
Unknown Object (File)
Jan 15 2025, 3:58 PM
Subscribers
None

Details

Summary

When reading the next code in a stream, avoid reading an extra byte if
we're going to throw it away. When there's no more bits to extract from
the stream, bits will be 0 and we'll mask the read byte with 0 anyway.
At worst, this will avoid reading one past the end of gbuf array (which
is not possible in well formed streams).

PR: 127912

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 59887
Build 56772: arc lint + arc unit