Merge commit '184c79729d4011f33027bcdc61a63d521017ebc1' into release/0.10

* commit '184c79729d4011f33027bcdc61a63d521017ebc1':
  h264_sei: check SEI size

Conflicts:
	libavcodec/h264_sei.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-08-09 19:30:07 +02:00
commit 330791c2ae

View File

@ -184,6 +184,12 @@ int ff_h264_decode_sei(H264Context *h){
if(s->avctx->debug&FF_DEBUG_STARTCODE)
av_log(h->s.avctx, AV_LOG_DEBUG, "SEI %d len:%d\n", type, size);
if (size > get_bits_left(&s->gb) / 8) {
av_log(s->avctx, AV_LOG_ERROR, "SEI type %d truncated at %d\n",
type, get_bits_left(&s->gb));
return AVERROR_INVALIDDATA;
}
switch(type){
case SEI_TYPE_PIC_TIMING: // Picture timing SEI
if(decode_picture_timing(h) < 0)