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 3a7afe9..cd55ee5 100644 --- a/libs/input/Input.cpp +++ b/libs/input/Input.cpp @@ -421,7 +421,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; } |