commit | aeaf7afb3fdf4f33e499f429ba1af687e0eddca0 | [log] [tgz] |
---|---|---|
author | Vincent Rabaud <vrabaud@google.com> | Thu Sep 07 21:16:03 2023 +0200 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Sep 21 17:27:11 2023 +0000 |
tree | 7cd833e4d5560aee7e280c72c113f21e77055ed5 | |
parent | 83ec0bc30597b9d36b1516fe26c85ac2fa243917 [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. Bug: 299477569 Bug: chromium:1479274 (cherry picked from commit 902bc9190331343b2017211debcec8d2ab87e17a) (cherry picked from commit 2af26267cdfcb63a88e5c74a85927a12d6ca1d76) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3acf2aa5c074d5659c386c4462059b78489030e0) Merged-In: Iaf8c74fe2b67925a577385be521791da42d47339 Change-Id: Iaf8c74fe2b67925a577385be521791da42d47339