Browse Source

swfdec: check lens validity

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
c73685398d
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavformat/swfdec.c

+ 4
- 0
libavformat/swfdec.c View File

@@ -155,6 +155,10 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
tag = get_swf_tag(pb, &len);
if (tag < 0)
return tag;
if (len < 0) {
av_log(s, AV_LOG_ERROR, "len %d is invalid\n", len);
return AVERROR_INVALIDDATA;
}
if (tag == TAG_VIDEOSTREAM) {
int ch_id = avio_rl16(pb);
len -= 2;


Loading…
Cancel
Save