OSDN Git Service

IGraphicBufferProducer: fix QUEUE_BUFFER info leak
authorRobert Shih <robertshih@google.com>
Mon, 11 Jan 2016 23:02:12 +0000 (15:02 -0800)
committerRobert Shih <robertshih@google.com>
Tue, 12 Jan 2016 00:33:17 +0000 (16:33 -0800)
Bug: 26338109
Change-Id: I8a979469bfe1e317ebdefa43685e19f9302baea8

libs/gui/IGraphicBufferProducer.cpp

index b73e69e..e713c04 100644 (file)
@@ -219,6 +219,7 @@ status_t BnGraphicBufferProducer::onTransact(
             QueueBufferOutput* const output =
                     reinterpret_cast<QueueBufferOutput *>(
                             reply->writeInplace(sizeof(QueueBufferOutput)));
+            memset(output, 0, sizeof(QueueBufferOutput));
             status_t result = queueBuffer(buf, input, output);
             reply->writeInt32(result);
             return NO_ERROR;