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

Commit 2a982b95 authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

libbinder: readString*Inplace SafetyNet (II) am: 61d0f848 am: 00070059 am: 082832d9

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If973ec32ec38d67e29d7abf381ee2b9071089d51
parents a5926187 082832d9
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -2058,9 +2058,12 @@ const char* Parcel::readString8Inplace(size_t* outLen) const
    if (size >= 0 && size < INT32_MAX) {
        *outLen = size;
        const char* str = (const char*)readInplace(size+1);
        if (str != nullptr && str[size] == '\0') {
        if (str != nullptr) {
            if (str[size] == '\0') {
                return str;
            }
            android_errorWriteLog(0x534e4554, "172655291");
        }
    }
    *outLen = 0;
    return nullptr;
@@ -2141,9 +2144,12 @@ const char16_t* Parcel::readString16Inplace(size_t* outLen) const
    if (size >= 0 && size < INT32_MAX) {
        *outLen = size;
        const char16_t* str = (const char16_t*)readInplace((size+1)*sizeof(char16_t));
        if (str != nullptr && str[size] == u'\0') {
        if (str != nullptr) {
            if (str[size] == u'\0') {
                return str;
            }
            android_errorWriteLog(0x534e4554, "172655291");
        }
    }
    *outLen = 0;
    return nullptr;