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

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

Clear allocation to avoid info leak

am: f7a38820

* commit 'f7a38820':
  Clear allocation to avoid info leak
parents 87ca2397 f7a38820
Loading
Loading
Loading
Loading
+32 −27
Original line number Original line Diff line number Diff line
@@ -598,10 +598,13 @@ status_t BnOMX::onTransact(


            size_t size = data.readInt32();
            size_t size = data.readInt32();


            void *params = malloc(size);
            status_t err = NO_MEMORY;
            data.read(params, size);
            void *params = calloc(size, 1);

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


            reply->writeInt32(err);
            reply->writeInt32(err);