am 11297581: am 18d79267: Check that the parcel contained the expected amount of region data. DO NOT MERGE
* commit '11297581667128d2568a47ee03acab5c4f9f2784': Check that the parcel contained the expected amount of region data. DO NOT MERGE
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user