Page MenuHomeFreeBSD

uncompress: Avoid reading an extra byte
ClosedPublic

Authored by imp on Thu, Oct 10, 5:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 4, 4:30 PM
Unknown Object (File)
Fri, Nov 1, 5:54 AM
Unknown Object (File)
Fri, Nov 1, 3:49 AM
Unknown Object (File)
Fri, Nov 1, 1:38 AM
Unknown Object (File)
Wed, Oct 30, 1:46 PM
Unknown Object (File)
Tue, Oct 29, 11:59 PM
Unknown Object (File)
Thu, Oct 24, 4:05 PM
Unknown Object (File)
Wed, Oct 23, 10:51 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 59887
Build 56772: arc lint + arc unit