OSDN Git Service

libgui: Check slot received from IGBP in Surface
authorDan Stoza <stoza@google.com>
Mon, 1 May 2017 23:31:53 +0000 (16:31 -0700)
committerJP Sugarbroad <jpsugar@google.com>
Fri, 19 May 2017 07:29:35 +0000 (00:29 -0700)
commit557879e8c02367bc98c3293e018fdd8d2aa96582
treecd374830d10cf118569f4df2e9f522e4f8a8521a
parent85c70951f318a0d4e404312e94dd9c4d03436e1b
libgui: Check slot received from IGBP in Surface

Checks that the slot number received from mGraphicBufferProducer in
Surface::dequeueBuffer is on the interval [0, NUM_BUFFER_SLOTS) to
protect against a malicious BnGraphicBufferProducer.

Bug: 36991414
Change-Id: I1a76fd1bcce1c558f1c0c30f03638278288ed4fa
(cherry picked from commit 90ce2a9c1d3af422c66b4061805831cb208263d8)
libs/gui/Surface.cpp