From: Pablo Ceballos Date: Wed, 16 Mar 2016 01:10:49 +0000 (-0700) Subject: BQ: fix some uninitialized variables X-Git-Tag: android-x86-7.1-r1~326^2~2^2^2^2^2~2^2^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=93c617fd2a5e7910e0ba5c0ed6da152d30920679;p=android-x86%2Fframeworks-native.git BQ: fix some uninitialized variables Bug 27555981 Bug 27556038 Change-Id: I436b6fec589677d7e36c0e980f6e59808415dc0e --- diff --git a/libs/gui/IGraphicBufferConsumer.cpp b/libs/gui/IGraphicBufferConsumer.cpp index dc917a8b66..590a25e4cc 100644 --- a/libs/gui/IGraphicBufferConsumer.cpp +++ b/libs/gui/IGraphicBufferConsumer.cpp @@ -478,7 +478,7 @@ status_t BnGraphicBufferConsumer::onTransact( } break; case GET_RELEASED_BUFFERS: { CHECK_INTERFACE(IGraphicBufferConsumer, data, reply); - uint64_t slotMask; + uint64_t slotMask = 0; status_t result = getReleasedBuffers(&slotMask); reply->writeInt64(slotMask); reply->writeInt32(result); diff --git a/libs/gui/IGraphicBufferProducer.cpp b/libs/gui/IGraphicBufferProducer.cpp index 67690b70dc..b5ec604a96 100644 --- a/libs/gui/IGraphicBufferProducer.cpp +++ b/libs/gui/IGraphicBufferProducer.cpp @@ -390,6 +390,7 @@ status_t BnGraphicBufferProducer::onTransact( QueueBufferOutput* const output = reinterpret_cast( reply->writeInplace(sizeof(QueueBufferOutput))); + memset(output, 0, sizeof(QueueBufferOutput)); status_t res = connect(listener, api, producerControlledByApp, output); reply->writeInt32(res); return NO_ERROR;