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)
Sat, Dec 20, 12:06 PM
Unknown Object (File)
Nov 29 2025, 12:11 PM
Unknown Object (File)
Nov 21 2025, 9:11 AM
Unknown Object (File)
Nov 13 2025, 3:51 AM
Unknown Object (File)
Oct 29 2025, 12:04 PM
Unknown Object (File)
Oct 28 2025, 3:40 AM
Unknown Object (File)
Oct 11 2025, 9:39 PM
Unknown Object (File)
Oct 11 2025, 9:39 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