History

Check for packet_length 0, it is already treated as invalid by the padding check, but that resulted in a confusing/wrong error message.

Originally committed as revision 19361 to svn://svn.ffmpeg.org/ffmpeg/trunk

Reimar Döffinger committed 17 years ago

Commit 96f07311 parent 4f766971 file · +1 −1Browse files

Unified · Split

libavformat/asfdec.c+1−1
@@ -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 length633 DO_2BITS(asf->packet_flags >> 3, padsize, 0); // padding length
634 634
635 //the following checks prevent overflows and infinite loops635 //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 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t