diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/input/Input.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp index 6f53996..83e241c 100644 --- a/libs/input/Input.cpp +++ b/libs/input/Input.cpp @@ -490,7 +490,8 @@ void MotionEvent::transform(const float matrix[9]) { status_t MotionEvent::readFromParcel(Parcel* parcel) { size_t pointerCount = parcel->readInt32(); size_t sampleCount = parcel->readInt32(); - if (pointerCount == 0 || pointerCount > MAX_POINTERS || sampleCount == 0) { + if (pointerCount == 0 || pointerCount > MAX_POINTERS || + sampleCount == 0 || sampleCount > MAX_SAMPLES) { return BAD_VALUE; } |