[FFmpeg-cvslog] r24352 - trunk/libavformat/asfdec.c

Måns Rullgård mans
Tue Jul 20 14:47:51 CEST 2010


mstorsjo <subversion at mplayerhq.hu> writes:

> Author: mstorsjo
> Date: Tue Jul 20 13:52:29 2010
> New Revision: 24352
>
> Log:
> asfdec: Don't read the video stream header if there isn't enough data
>
> Modified:
>    trunk/libavformat/asfdec.c
>
> Modified: trunk/libavformat/asfdec.c
> ==============================================================================
> --- trunk/libavformat/asfdec.c	Tue Jul 20 13:50:57 2010	(r24351)
> +++ trunk/libavformat/asfdec.c	Tue Jul 20 13:52:29 2010	(r24352)
> @@ -361,7 +361,8 @@ static int asf_read_header(AVFormatConte
>                      st->codec->frame_size = 1;
>                      break;
>                  }
> -            } else if (type == AVMEDIA_TYPE_VIDEO) {
> +            } else if (type == AVMEDIA_TYPE_VIDEO &&
> +                       gsize - (url_ftell(pb) - pos1 + 24) >= 53) {
>                  get_le32(pb);
>                  get_le32(pb);
>                  get_byte(pb);

I don't know how, but this broke the regression test.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-cvslog mailing list