Originally committed as revision 19361 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -633,7 +633,7 @@ static int ff_asf_get_packet(AVFormatContext *s, ByteIOContext *pb) · 632 unmodified lines | |||
| 633 | DO_2BITS(asf->packet_flags >> 3, padsize, 0); // padding length | 633 | DO_2BITS(asf->packet_flags >> 3, padsize, 0); // padding length |
| 634 | 634 | ||
| 635 | //the following checks prevent overflows and infinite loops | 635 | //the following checks prevent overflows and infinite loops |
| 636 | if(packet_length >= (1U<<29)){ | 636 | if(!packet_length || packet_length >= (1U<<29)){ |
| 637 | av_log(s, AV_LOG_ERROR, "invalid packet_length %d at:%"PRId64"\n", packet_length, url_ftell(pb)); | 637 | av_log(s, AV_LOG_ERROR, "invalid packet_length %d at:%"PRId64"\n", packet_length, url_ftell(pb)); |
| 638 | return -1; | 638 | return -1; |
| 639 | } | 639 | } |