mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
The folded Rice value was unfolded with a signed shift, which is wrong once it reaches 2^31, and the unary length limit was (INT_MAX >> k) + 2, about half of what a 32-bit residual can need. Streams with very large residuals (FLAC decoder testbench file 63) were misparsed, overran the frame and lost sync at the next one. Unfold as unsigned and derive the limit from UINT_MAX, clamped to INT_MAX. The fast path is unchanged. The existing 0x80000000 error check now also works as intended, since the Golomb reader's error value maps to it. The FLAC spec forbids a residual of -2^31. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Change-Id: I0bdce9db69e1b30565ecc23126923ba401b7deca |
||
|---|---|---|
| .. | ||
| arm_support | ||
| fixedpoint | ||
| libsetjmp | ||
| microtar | ||
| mipsunwinder | ||
| rbcodec | ||
| skin_parser | ||
| tlsf | ||
| unwarminder | ||
| utf8proc | ||