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

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

Check mprotect result am: 866c800c am: a0cfcf38

am: 638aca47

Change-Id: I337dd1d62a4cd52de051afd4d9b919a742ad20fe
parents 9a5ec6b4 638aca47
Loading
Loading
Loading
Loading
+28 −24
Original line number Diff line number Diff line
@@ -657,7 +657,10 @@ status_t BnOMX::onTransact(
                            // mark the last page as inaccessible, to avoid exploitation
                            // of codecs that access past the end of the allocation because
                            // they didn't check the size
                            mprotect((char*)params + allocSize - pageSize, pageSize, PROT_NONE);
                            if (mprotect((char*)params + allocSize - pageSize, pageSize,
                                    PROT_NONE) != 0) {
                                ALOGE("mprotect failed: %s", strerror(errno));
                            } else {
                                switch (code) {
                                    case GET_PARAMETER:
                                        err = getParameter(node, index, params, size);
@@ -685,6 +688,7 @@ status_t BnOMX::onTransact(
                                }
                            }
                        }
                    }
                } else {
                    ALOGE("couldn't map: %s", strerror(errno));
                }