From: Yaowu Xu Date: Tue, 16 Dec 2014 17:30:24 +0000 (-0800) Subject: Merge "Prevent decoder from using uninitialized entropy context." X-Git-Tag: v1.4.0~350 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b60ae45f36ee0cfb18eb9f297bf704b0c8a8d646;p=libvpx Merge "Prevent decoder from using uninitialized entropy context." --- b60ae45f36ee0cfb18eb9f297bf704b0c8a8d646 diff --cc vp9/decoder/vp9_decodeframe.c index 58df87d0c,470b2bae8..5bf44d7da --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@@ -1556,7 -1558,12 +1556,11 @@@ void vp9_decode_frame(VP9Decoder *pbi vp9_setup_block_planes(xd, cm->subsampling_x, cm->subsampling_y); *cm->fc = cm->frame_contexts[cm->frame_context_idx]; + if (!cm->fc->initialized) + vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + "Uninitialized entropy context."); + vp9_zero(cm->counts); - vp9_zero(xd->dqcoeff); xd->corrupted = 0; new_fb->corrupted = read_compressed_header(pbi, data, first_partition_size);