changeset 6173:11d2976cddc4 libavcodec

Fix crash for CAVLC->CABAC switch caused by writing into NULL tables. (iam not sure if this might have been exploitable) fixes issue332 / CVCANLMA2_Sony_C.jsv Other solutions which waste a few bytes less are welcome ...
author michael
date Thu, 24 Jan 2008 19:31:59 +0000
parents 13aa4cac4dde
children 3544e992b60b
files h264.c
diffstat 1 files changed, 0 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Wed Jan 23 21:27:07 2008 +0000
+++ b/h264.c	Thu Jan 24 19:31:59 2008 +0000
@@ -2035,12 +2035,10 @@
     CHECKED_ALLOCZ(h->slice_table_base  , (big_mb_num+s->mb_stride) * sizeof(uint8_t))
     CHECKED_ALLOCZ(h->cbp_table, big_mb_num * sizeof(uint16_t))
 
-    if( h->pps.cabac ) {
         CHECKED_ALLOCZ(h->chroma_pred_mode_table, big_mb_num * sizeof(uint8_t))
         CHECKED_ALLOCZ(h->mvd_table[0], 32*big_mb_num * sizeof(uint16_t));
         CHECKED_ALLOCZ(h->mvd_table[1], 32*big_mb_num * sizeof(uint16_t));
         CHECKED_ALLOCZ(h->direct_table, 32*big_mb_num * sizeof(uint8_t));
-    }
 
     memset(h->slice_table_base, -1, (big_mb_num+s->mb_stride)  * sizeof(uint8_t));
     h->slice_table= h->slice_table_base + s->mb_stride*2 + 1;