Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manual cherry-pick of patch originally reviewed on https://chromium-review.googlesource.com/c/chromium/src/+/5249171: Improve handling of malformed BMP palettes. Add CHECKs to guarantee that clr_used is reasonably sized when ProcessColorTable() is called. Out-of-bounds values are capped by ProcessInfoHeader() already, but since this happens at a distance, it's better to be sure. Additionally, we would previously add padding elements to a palette if it was shorter than expected. We already had bounds checks at the places where the palette was accessed, so we now rely on those checks instead. Bug: 1523030 Change-Id: I579c67d1029e1effba2036e9ec0c871418b140e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5249171 Commit-Queue: John Stiles <johnstiles@google.com> Reviewed-by: Peter Kasting <pkasting@chromium.org> Auto-Submit: John Stiles <johnstiles@google.com> Cr-Commit-Position: refs/heads/main@{#1254490} Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/551119 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
- Loading branch information