diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-11-14 22:24:10 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-11-14 22:24:10 +0000 |
commit | 2dbe0bd45fbdff99f2fd50c1a7fee3bc5ce96cee (patch) | |
tree | d1d9ac87a8785821fff5f8073cc7bccfd9a938f4 | |
parent | 8ba3e5d84351db957a3b94e5daaaf7fbdb685828 (diff) | |
download | ffmpeg-2dbe0bd45fbdff99f2fd50c1a7fee3bc5ce96cee.tar.gz |
check for frames with 2*size > max_dist and no crc
Originally committed as revision 7076 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/nutdec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 97bad2410d..b3e49435de 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -687,6 +687,9 @@ static int decode_frame_header(NUTContext *nut, int *flags_ret, int64_t *pts, in get_v(bc); if(flags&FLAG_CHECKSUM){ get_be32(bc); //FIXME check this + }else if(size > 2*nut->max_distance){ + av_log(s, AV_LOG_ERROR, "frame size > 2max_distance and no checksum\n"); + return -1; } *flags_ret= flags; |