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

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

Check mprotect result am: 866c800c am: a0cfcf38 am: 638aca47 am:...

Check mprotect result am: 866c800c am: a0cfcf38 am: 638aca47 am: e353ce4b am: 762b7a9b am: db8cfb97 am: dffa39ac am: 53b2b9eb am: 4073c59a am: 093d1641
am: 0b001b52

Change-Id: I22af9732a7d15ab13dbf4994a0bc72d1716cc180
parents cdabec64 0b001b52
Loading
Loading
Loading
Loading
+28 −24
Original line number Diff line number Diff line
@@ -775,7 +775,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);
@@ -803,6 +806,7 @@ status_t BnOMX::onTransact(
                                }
                            }
                        }
                    }
                } else {
                    ALOGE("couldn't map: %s", strerror(errno));
                }