Merge "Prevent decoder from using uninitialized entropy context."
authorYaowu Xu <yaowu@google.com>
Tue, 16 Dec 2014 17:30:24 +0000 (09:30 -0800)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Tue, 16 Dec 2014 17:30:24 +0000 (09:30 -0800)
1  2 
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);