Page MenuHomeFreeBSD

uncompress: Avoid reading an extra byte
ClosedPublic

Authored by imp on Oct 10 2024, 5:02 PM.
Tags
None
Referenced Files
F151527799: D47041.id.diff
Thu, Apr 9, 1:02 AM
Unknown Object (File)
Wed, Apr 8, 1:42 AM
Unknown Object (File)
Tue, Apr 7, 4:12 PM
Unknown Object (File)
Tue, Apr 7, 7:18 AM
Unknown Object (File)
Feb 28 2026, 10:10 PM
Unknown Object (File)
Feb 21 2026, 6:55 PM
Unknown Object (File)
Feb 8 2026, 12:18 PM
Unknown Object (File)
Feb 8 2026, 3:06 AM
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