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

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

am b6e3f930: am 2bbcc253: am b36ace74: Merge "Check that the parcel contained...

am b6e3f930: am 2bbcc253: am b36ace74: Merge "Check that the parcel contained the expected amount of region data. DO NOT MERGE" into lmp-dev

* commit 'b6e3f930':
  Check that the parcel contained the expected amount of region data. DO NOT MERGE
parents bf0439a7 b6e3f930
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -212,9 +212,13 @@ static jlong Region_createFromParcel(JNIEnv* env, jobject clazz, jobject parcel)


    android::Parcel* p = android::parcelForJavaObject(env, parcel);
    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;
    SkRegion* region = new SkRegion;
    size_t size = p->readInt32();
    region->readFromMemory(regionData, size);
    region->readFromMemory(p->readInplace(size), size);


    return reinterpret_cast<jlong>(region);
    return reinterpret_cast<jlong>(region);
}
}