OSDN Git Service

Fix security vulneratibly 31960359
authorFabien Sanglard <sanglardf@google.com>
Mon, 5 Dec 2016 23:06:29 +0000 (15:06 -0800)
committerFabien Sanglard <sanglardf@google.com>
Mon, 5 Dec 2016 23:08:32 +0000 (15:08 -0800)
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

libs/gui/BufferQueueCore.cpp

index 9cb9c62..4f6ecff 100644 (file)
@@ -89,6 +89,7 @@ BufferQueueCore::BufferQueueCore(const sp<IGraphicBufferAlloc>& 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) {