am 18d79267: Check that the parcel contained the expected amount of region data. DO NOT MERGE
* commit '18d7926709451b9e767731f46778e4238fc8e3b5': Check that the parcel contained the expected amount of region data. DO NOT MERGE
This commit is contained in:
@@ -175,9 +175,13 @@ static SkRegion* Region_createFromParcel(JNIEnv* env, jobject clazz, jobject par
|
|||||||
|
|
||||||
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 region;
|
return region;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user