aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-19 11:29:49 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-19 11:29:55 +0200
commit80a37fc3e10a093d3aff7c9f5c4f62c7d9688f23 (patch)
treec56807418613fd90756aeec52e857214792571ad
parentf509c9503a8fdb0ae7c5b0e6e932d3bc66249fcc (diff)
parent0989d3ad1fbd7509815208b0a5792918492d2a68 (diff)
downloadffmpeg-80a37fc3e10a093d3aff7c9f5c4f62c7d9688f23.tar.gz
Merge commit '0989d3ad1fbd7509815208b0a5792918492d2a68'
* commit '0989d3ad1fbd7509815208b0a5792918492d2a68': asfdec: convert condition for the replicated data reading to be safer Merged-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/asfdec_o.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c
index 69c9a50b57..c0eb9566f7 100644
--- a/libavformat/asfdec_o.c
+++ b/libavformat/asfdec_o.c
@@ -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);