commit | 51b23ccc575bcc31b68e97f71089636d551e9a25 | [log] [tgz] |
---|---|---|
author | Chris Craik <ccraik@google.com> | Tue Jan 10 15:09:08 2017 -0800 |
committer | Adam Seaton <aseaton@google.com> | Tue Jan 24 19:37:14 2017 +0000 |
tree | c031169e1c500b3d684d591e0f6c206dd2ff3b85 | |
parent | 5f13b3fa3b32f6082ad46e3188da5365b1545aa1 [diff] |
Handle small sized webps correctly fix merge conflict into nyc-bugfix-release bug:33718716 Change-Id: I54d63d54c7057828dfca1ab4ef47a44760e94ece
diff --git a/framesequence/jni/FrameSequence_webp.cpp b/framesequence/jni/FrameSequence_webp.cpp index 034847a..aa99b90 100644 --- a/framesequence/jni/FrameSequence_webp.cpp +++ b/framesequence/jni/FrameSequence_webp.cpp
@@ -105,6 +105,10 @@ return; } mData.size = CHUNK_HEADER_SIZE + readSize; + if(mData.size < RIFF_HEADER_SIZE) { + ALOGE("WebP file malformed"); + return; + } mData.bytes = new uint8_t[mData.size]; memcpy((void*)mData.bytes, riff_header, RIFF_HEADER_SIZE);