Page MenuHomeFreeBSD

uncompress: Avoid reading an extra byte
ClosedPublic

Authored by imp on Oct 10 2024, 5:02 PM.
Tags
None
Referenced Files
F168413572: D47041.id144599.diff
Fri, Aug 28, 3:51 AM
Unknown Object (File)
Wed, Aug 26, 8:58 AM
Unknown Object (File)
Mon, Aug 24, 5:12 PM
Unknown Object (File)
Wed, Aug 12, 6:45 AM
Unknown Object (File)
Tue, Aug 11, 11:58 PM
Unknown Object (File)
Mon, Aug 3, 6:00 PM
Unknown Object (File)
May 26 2026, 10:40 PM
Unknown Object (File)
May 11 2026, 11:24 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 Not Applicable
Unit
Tests Not Applicable