changeset 9911:14edbbff0f25 libavcodec

H.264: Check the return value of decode_vui_parameters() Files with invalid VUI are now rejected like other invalid SPS are. Fixes issue1231.
author astrange
date Sat, 04 Jul 2009 07:46:58 +0000
parents d07aee233d03
children 9502108caadf
files h264.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Fri Jul 03 05:52:00 2009 +0000
+++ b/h264.c	Sat Jul 04 07:46:58 2009 +0000
@@ -7278,7 +7278,8 @@
 
     sps->vui_parameters_present_flag= get_bits1(&s->gb);
     if( sps->vui_parameters_present_flag )
-        decode_vui_parameters(h, sps);
+        if (decode_vui_parameters(h, sps) < 0)
+            goto fail;
 
     if(s->avctx->debug&FF_DEBUG_PICT_INFO){
         av_log(h->s.avctx, AV_LOG_DEBUG, "sps:%u profile:%d/%d poc:%d ref:%d %dx%d %s %s crop:%d/%d/%d/%d %s %s %d/%d\n",