Browse Source

check forw_ptr CRC

Originally committed as revision 10017 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 18 years ago
parent
commit
47772399ec
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavformat/nutdec.c

+ 4
- 1
libavformat/nutdec.c View File

@@ -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);



Loading…
Cancel
Save