• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/base


Commit MetaInfo

Revisión1e72dc7a3074cd0b44d89afbf39bbf5000ef7cc3 (tree)
Tiempo2015-08-14 11:41:42
AutorLeon Scroggins III <scroggo@goog...>
CommiterThe Android Automerger

Log Message

DO NOT MERGE: Ensure that unparcelling Region only reads the expected number of bytes

bug: 20883006
Change-Id: I4f109667fb210a80fbddddf5f1bfb7ef3a02b6ce

Cambiar Resumen

Diferencia incremental

--- a/core/jni/android/graphics/Region.cpp
+++ b/core/jni/android/graphics/Region.cpp
@@ -218,7 +218,12 @@ static jlong Region_createFromParcel(JNIEnv* env, jobject clazz, jobject parcel)
218218 return NULL;
219219 }
220220 SkRegion* region = new SkRegion;
221- region->readFromMemory(regionData, size);
221+ size_t actualSize = region->readFromMemory(regionData, size);
222+
223+ if (size != actualSize) {
224+ delete region;
225+ return NULL;
226+ }
222227
223228 return reinterpret_cast<jlong>(region);
224229 }