Page MenuHomeFreeBSD

uncompress: Avoid reading an extra byte
ClosedPublic

Authored by imp on Oct 10 2024, 5:02 PM.
Tags
None
Referenced Files
F107541417: D47041.diff
Wed, Jan 15, 3:58 PM
Unknown Object (File)
Sat, Dec 28, 10:07 AM
Unknown Object (File)
Nov 24 2024, 4:33 PM
Unknown Object (File)
Nov 6 2024, 12:34 PM
Unknown Object (File)
Nov 4 2024, 4:30 PM
Unknown Object (File)
Nov 1 2024, 5:54 AM
Unknown Object (File)
Nov 1 2024, 3:49 AM
Unknown Object (File)
Nov 1 2024, 1:38 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