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

Commit 3ff978a5 authored by Leon Scroggins III's avatar Leon Scroggins III Committed by Android Git Automerger
Browse files

am 77dde3cb: am 6b16398d: am 604ae32b: am 4dae8e41: Merge "DO NOT MERGE:...

am 77dde3cb: am 6b16398d: am 604ae32b: am 4dae8e41: Merge "DO NOT MERGE: Ensure that unparcelling Region only reads the expected number of bytes" into lmp-dev

* commit '77dde3cb':
  DO NOT MERGE: Ensure that unparcelling Region only reads the expected number of bytes
parents 34c7bd7c 77dde3cb
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -218,7 +218,12 @@ static jlong Region_createFromParcel(JNIEnv* env, jobject clazz, jobject parcel)
        return NULL;
    }
    SkRegion* region = new SkRegion;
    region->readFromMemory(regionData, size);
    size_t actualSize = region->readFromMemory(regionData, size);

    if (size != actualSize) {
        delete region;
        return NULL;
    }

    return reinterpret_cast<jlong>(region);
}