Page MenuHomeFreeBSD

uncompress: Avoid reading an extra byte
ClosedPublic

Authored by imp on Oct 10 2024, 5:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 26, 10:40 PM
Unknown Object (File)
May 11 2026, 11:24 PM
Unknown Object (File)
May 11 2026, 11:13 PM
Unknown Object (File)
May 11 2026, 11:02 PM
Unknown Object (File)
May 7 2026, 8:45 PM
Unknown Object (File)
Apr 29 2026, 1:28 PM
Unknown Object (File)
Apr 29 2026, 5:10 AM
Unknown Object (File)
Apr 27 2026, 1:54 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