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

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

am 18d79267: Check that the parcel contained the expected amount of region data. DO NOT MERGE

* commit '18d79267':
  Check that the parcel contained the expected amount of region data. DO NOT MERGE
parents a7501119 18d79267
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -175,9 +175,13 @@ static SkRegion* Region_createFromParcel(JNIEnv* env, jobject clazz, jobject par

    android::Parcel* p = android::parcelForJavaObject(env, parcel);

    const size_t size = p->readInt32();
    const void* regionData = p->readInplace(size);
    if (regionData == NULL) {
        return NULL;
    }
    SkRegion* region = new SkRegion;
    size_t size = p->readInt32();
    region->readFromMemory(p->readInplace(size), size);
    region->readFromMemory(regionData, size);

    return region;
}