Convert strides with padding in skia::SkBitmapToN32OpaqueOrPremul().
Code using bitmaps converted with SkBitmapToN32OpaqueOrPremul() can easily assume that the pixels are one contiguous (width*4*height)-sized buffer. If it's not then out-of-bounds read/write can occur. Also adds tests for SkBitmapToN32OpaqueOrPremul(). R=fmalita@chromium.org Bug: 1147431, 1144462 Change-Id: I21f7a958a8c9231bf5f052f8ff246f2c249bd70b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2544032 Commit-Queue: danakj <danakj@chromium.org> Reviewed-by:Florin Malita <fmalita@chromium.org> Cr-Commit-Position: refs/heads/master@{#828406}
Showing
Please register or sign in to comment