Commit 80a37fc3 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '0989d3ad'

* commit '0989d3ad':
  asfdec: convert condition for the replicated data reading to be safer
Merged-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parents f509c950 0989d3ad
......@@ -1133,7 +1133,7 @@ static int asf_read_multiple_payload(AVFormatContext *s, AVPacket *pkt,
} else
avio_skip(pb, 4); // reading of media object size is already done
asf_pkt->dts = avio_rl32(pb); // read presentation time
if (asf->rep_data_len && ((asf->rep_data_len - 8) > 0))
if (asf->rep_data_len && (asf->rep_data_len >= 8))
avio_skip(pb, asf->rep_data_len - 8); // skip replicated data
}
pay_len = avio_rl16(pb); // payload length should be WORD
......@@ -1183,7 +1183,7 @@ static int asf_read_single_payload(AVFormatContext *s, AVPacket *pkt,
} else
avio_skip(pb, 4); // skip media object size
asf_pkt->dts = avio_rl32(pb); // read presentation time
if ((asf->rep_data_len - 8) > 0)
if (asf->rep_data_len >= 8)
avio_skip(pb, asf->rep_data_len - 8); // skip replicated data
offset = avio_tell(pb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment