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

Commit 1e780d3e authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Clear allocation to avoid info leak am: f7a38820 am: 33514675 am:...

Clear allocation to avoid info leak am: f7a38820 am: 33514675 am: 776aacce am: 9a7fc249 am: d132bc5b am: 46b4f095 am: 7786bd93
am: 313d9f14

* commit '313d9f14':
  Clear allocation to avoid info leak
parents 97f13565 313d9f14
Loading
Loading
Loading
Loading
+32 −27
Original line number Diff line number Diff line
@@ -692,10 +692,13 @@ status_t BnOMX::onTransact(

            size_t size = data.readInt64();

            void *params = malloc(size);
            data.read(params, size);

            status_t err;
            status_t err = NO_MEMORY;
            void *params = calloc(size, 1);
            if (params) {
                err = data.read(params, size);
                if (err != OK) {
                    android_errorWriteLog(0x534e4554, "26914474");
                } else {
                    switch (code) {
                        case GET_PARAMETER:
                            err = getParameter(node, index, params, size);
@@ -721,6 +724,8 @@ status_t BnOMX::onTransact(
                        default:
                            TRESPASS();
                    }
                }
            }

            reply->writeInt32(err);