diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-01-22 21:17:54 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-01-22 21:17:54 +0000 |
commit | 13f7e4b966a99d870eeb8b6afb343d2e66a994af (patch) | |
tree | ba7d54e48365b9847f0da418d6be303cb45e9de9 /libavformat/asf.c | |
parent | 1ae7518dda64e93a28044323ecd5825b61c4208f (diff) | |
download | ffmpeg-13f7e4b966a99d870eeb8b6afb343d2e66a994af.tar.gz |
check to detect nonsense fragment size
Originally committed as revision 7653 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf.c')
-rw-r--r-- | libavformat/asf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index 60050de0e6..6c4bb35d5d 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -571,6 +571,10 @@ static int asf_read_frame_header(AVFormatContext *s){ } if (asf->packet_flags & 0x01) { DO_2BITS(asf->packet_segsizetype >> 6, asf->packet_frag_size, 0); // 0 is illegal + if(asf->packet_frag_size > asf->packet_size_left - rsize){ + av_log(s, AV_LOG_ERROR, "packet_frag_size is invalid\n"); + return -1; + } //printf("Fragsize %d\n", asf->packet_frag_size); } else { asf->packet_frag_size = asf->packet_size_left - rsize; |