summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2014-01-23 15:43:08 -0800
committerYaowu Xu <yaowu@google.com>2014-01-23 15:43:08 -0800
commit10b0813a9cbdb76df6a2ec8a011bc5862082b37e (patch)
treeaab5d932405a184a49463fb51e3645bb46bceaa9 /vp9
parenta72cc78ec581a12affea7e053cd6e56f226270c3 (diff)
downloadlibvpx-10b0813a9cbdb76df6a2ec8a011bc5862082b37e.tar
libvpx-10b0813a9cbdb76df6a2ec8a011bc5862082b37e.tar.gz
libvpx-10b0813a9cbdb76df6a2ec8a011bc5862082b37e.tar.bz2
libvpx-10b0813a9cbdb76df6a2ec8a011bc5862082b37e.zip
Changed to prevent decoder crash
The change prevent a decoder crash for invalid stream with negative size. Change-Id: I7411765f3524c783058fa3d436549be4e75d8969
Diffstat (limited to 'vp9')
-rw-r--r--vp9/decoder/vp9_decodeframe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c
index d66ee2730..fa680d983 100644
--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -743,7 +743,7 @@ static void setup_frame_size_with_refs(VP9D_COMP *pbi,
if (!found)
read_frame_size(rb, &width, &height);
- if (!width || !height)
+ if (width <= 0 || height <= 0)
vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
"Referenced frame with invalid size");