diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-08-09 12:51:08 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-08-09 12:51:08 +0000 |
commit | 47772399ec7e7cdcd8071e9bff24e1ad73e1d03f (patch) | |
tree | 345db0a25766dbaa04498213ed0971ed7592d6bd | |
parent | 6c666941eb2904d7c33fe91495d1ca47be92f2a7 (diff) | |
download | ffmpeg-47772399ec7e7cdcd8071e9bff24e1ad73e1d03f.tar.gz |
check forw_ptr CRC
Originally committed as revision 10017 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/nutdec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 60ae789ed8..1ef7bcd73b 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -103,9 +103,12 @@ static int get_packetheader(NUTContext *nut, ByteIOContext *bc, int calculate_ch int64_t size; // start= url_ftell(bc) - 8; + init_checksum(bc, av_crc04C11DB7_update, 0); size= get_v(bc); if(size > 4096) - get_be32(bc); //FIXME check this + get_be32(bc); + if(get_checksum(bc) && size > 4096) + return -1; init_checksum(bc, calculate_checksum ? av_crc04C11DB7_update : NULL, 0); |