Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e44b43f0 authored by Naveen Leekha's avatar Naveen Leekha Committed by Jessica Wagantall
Browse files

Initialize local variables to avoid data leak

The uninitialized local variables pick up
whatever the memory content was there on stack.
This data gets sent to the remote process in
case of a failed transaction, which is a security
issue. Fixed.

(Partial manual merge of master change
 12ba0f57. Rest
 to automerge from klp-dev)

For b/23696300

Change-Id: I704c9fab327b3545c58e8a9a96ac542eb7469c2a
(cherry picked from commit b414255f)
Ticket: CYNGNOS-1189
parent 571412c0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -362,7 +362,7 @@ status_t BnGraphicBufferProducer::onTransact(
            CHECK_INTERFACE(IGraphicBufferProducer, data, reply);
            sp<GraphicBuffer> buffer = new GraphicBuffer();
            data.read(*buffer.get());
            int slot;
            int slot = 0;
            int result = attachBuffer(&slot, buffer);
            reply->writeInt32(slot);
            reply->writeInt32(result);