| commit | a298d9d127865570bb81710299d7614490d97603 | [log] [tgz] |
|---|---|---|
| author | Vincent Rabaud <vrabaud@google.com> | Tue Oct 03 12:16:52 2023 |
| committer | Vincent Rabaud <vrabaud@google.com> | Mon Oct 09 14:24:38 2023 |
| tree | 81ed985745cd57e01d99c6ad6cf8f10277b48d45 | |
| parent | ef52aca92240c3f5f70a40123e15c90ce03945b2 [diff] |
Fix OOB write in BuildHuffmanTable. First, BuildHuffmanTable is called to check if the data is valid. If it is and the table is not big enough, more memory is allocated. This will make sure that valid (but unoptimized because of unbalanced codes) streams are still decodable. (cherry picked from commit 902bc91) Change-Id: I3abe4db460dcac62c14a84832284c0b530630af2