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

Commit 43e1d0b9 authored by Hans Boehm's avatar Hans Boehm Committed by Automerger Merge Worker
Browse files

Merge "Check hidden API exemptions" into sc-dev am: edd06b48 am: 8627a9fa...

Merge "Check hidden API exemptions" into sc-dev am: edd06b48 am: 8627a9fa am: 1caafed4 am: 6e92ef19

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/26721087



Change-Id: I682db452d79983c43a6e09ac2b812c9aaa4f0e6e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 48d505f5 6e92ef19
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -431,6 +431,8 @@ public class ZygoteProcess {
                throw new ZygoteStartFailedEx("Embedded newlines not allowed");
            } else if (arg.indexOf('\r') >= 0) {
                throw new ZygoteStartFailedEx("Embedded carriage returns not allowed");
            } else if (arg.indexOf('\u0000') >= 0) {
                throw new ZygoteStartFailedEx("Embedded nulls not allowed");
            }
        }

@@ -972,6 +974,14 @@ public class ZygoteProcess {
            return true;
        }

        for (/* NonNull */ String s : mApiDenylistExemptions) {
            // indexOf() is intrinsified and faster than contains().
            if (s.indexOf('\n') >= 0 || s.indexOf('\r') >= 0 || s.indexOf('\u0000') >= 0) {
                Slog.e(LOG_TAG, "Failed to set API denylist exemptions: Bad character");
                mApiDenylistExemptions = Collections.emptyList();
                return false;
            }
        }
        try {
            state.mZygoteOutputWriter.write(Integer.toString(mApiDenylistExemptions.size() + 1));
            state.mZygoteOutputWriter.newLine();