From: Fabien Sanglard Date: Mon, 5 Dec 2016 23:06:29 +0000 (-0800) Subject: Fix security vulneratibly 31960359 X-Git-Tag: android-x86-7.1-r1~22^2^2~2^2^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=dffa078205;p=android-x86%2Fframeworks-native.git Fix security vulneratibly 31960359 BufferQueueCore features a variable mLastQueuedSlot which is not initialized in its constructor resulting in security vulnerability Bug: 31960359 Change-Id: If892f59f6288d8b81b1e312995832a20c8341494 Tests: Manually on Angler --- diff --git a/libs/gui/BufferQueueCore.cpp b/libs/gui/BufferQueueCore.cpp index 9cb9c62401..4f6ecffd60 100644 --- a/libs/gui/BufferQueueCore.cpp +++ b/libs/gui/BufferQueueCore.cpp @@ -89,6 +89,7 @@ BufferQueueCore::BufferQueueCore(const sp& allocator) : mSharedBufferSlot(INVALID_BUFFER_SLOT), mSharedBufferCache(Rect::INVALID_RECT, 0, NATIVE_WINDOW_SCALING_MODE_FREEZE, HAL_DATASPACE_UNKNOWN), + mLastQueuedSlot(INVALID_BUFFER_SLOT), mUniqueId(getUniqueId()) { if (allocator == NULL) {