OSDN Git Service

Validate pixel unpack buffer offset.
authorNicolas Capens <capn@google.com>
Thu, 22 Mar 2018 04:44:07 +0000 (00:44 -0400)
committerNicolas Capens <nicolascapens@google.com>
Mon, 26 Mar 2018 20:23:58 +0000 (20:23 +0000)
commit16a2a922cfd8251a462c9ea5f90105e4d686c211
tree23186c32c5a231ba49b2e753aaf87ad77cb3ba43
parent9869bedb56822d19c9bfbdb33f6af061da8e6106
Validate pixel unpack buffer offset.

When a pixel unpack buffer is bound, glTexImage calls interpret the
<pixels> parameter as an offset into the pixel buffer. We weren't
validating that the accessed data falls within the buffer, when taking
the offset into account.

Bug chromium:822976

Change-Id: I3ab23e3b135fd4ad1e55555eec95d584684f5d82
Reviewed-on: https://swiftshader-review.googlesource.com/17928
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
src/OpenGL/libGLESv2/Context.cpp
src/OpenGL/libGLESv2/utilities.cpp
src/OpenGL/libGLESv2/utilities.h