Page MenuHomeFreeBSD

uncompress: Avoid reading an extra byte
ClosedPublic

Authored by imp on Oct 10 2024, 5:02 PM.
Tags
None
Referenced Files
F151332444: D47041.id144652.diff
Tue, Apr 7, 4:12 PM
F151279686: D47041.id144652.diff
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
Unknown Object (File)
Jan 30 2026, 8:42 PM
Unknown Object (File)
Jan 30 2026, 1:03 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 Not Applicable
Unit
Tests Not Applicable