Fix integer overflow in BaseRenderingContext2D::PutByteArray
In PutByteArray, the available byte array to allocated is calculated by: src_bytes_per_row = bytes_per_pixel *source_size.Width where source_size.Width is int_32 and src_bytes_per_row is uint_32. It's possible that src_bytes_per_row is valid and bytes_per_pixel*source_size.Width return integer overflow. In this cl, I added CheckMath for the assignment to src_bytes_per_row. Bug: 1084404 Change-Id: Ib52006b03eb37d8ca969e5835538edde4bc7257b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2204831 Commit-Queue: Yi Xu <yiyix@chromium.org> Reviewed-by:Fernando Serboncini <fserb@chromium.org> Reviewed-by:
Juanmi Huertas <juanmihd@chromium.org> Cr-Commit-Position: refs/heads/master@{#771628}
Showing
Please register or sign in to comment