From 030172e49c866943203e4906b26e1a132ff94ff4 Mon Sep 17 00:00:00 2001 From: Pablo Ceballos Date: Tue, 15 Mar 2016 18:10:49 -0700 Subject: [PATCH] DO NOT MERGE BQ: fix some uninitialized variables Bug 27555981 Bug 27556038 Change-Id: I436b6fec589677d7e36c0e980f6e59808415dc0e --- libs/gui/IGraphicBufferConsumer.cpp | 2 +- libs/gui/IGraphicBufferProducer.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/gui/IGraphicBufferConsumer.cpp b/libs/gui/IGraphicBufferConsumer.cpp index 9574b61762..ea9829676b 100644 --- a/libs/gui/IGraphicBufferConsumer.cpp +++ b/libs/gui/IGraphicBufferConsumer.cpp @@ -410,7 +410,7 @@ status_t BnGraphicBufferConsumer::onTransact( } break; case GET_RELEASED_BUFFERS: { CHECK_INTERFACE(IGraphicBufferConsumer, data, reply); - uint32_t slotMask; + uint32_t slotMask = 0; status_t result = getReleasedBuffers(&slotMask); reply->writeInt32(slotMask); reply->writeInt32(result); diff --git a/libs/gui/IGraphicBufferProducer.cpp b/libs/gui/IGraphicBufferProducer.cpp index e713c04493..6549a0c04e 100644 --- a/libs/gui/IGraphicBufferProducer.cpp +++ b/libs/gui/IGraphicBufferProducer.cpp @@ -249,6 +249,7 @@ status_t BnGraphicBufferProducer::onTransact( QueueBufferOutput* const output = reinterpret_cast( reply->writeInplace(sizeof(QueueBufferOutput))); + memset(output, 0, sizeof(QueueBufferOutput)); status_t res = connect(token, api, producerControlledByApp, output); reply->writeInt32(res); return NO_ERROR; -- 2.11.0