Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Walker <tdskywalker@gmail.com>2015-11-22 02:02:37 +0300
committerLuca Barbato <lu_zero@gentoo.org>2015-11-23 13:32:32 +0300
commitc12c085be7e86880924249e5cb3f898e45dee134 (patch)
treec99843424069f4cb0d1181a904f7b0bec11cc92a /libavcodec/dcadec.c
parentc8fa647811371885be421a84a2388529857fed23 (diff)
dcadec: Do not check for overreads in auxiliary data
The auxiliary data length field is not reliable, and incorrect overread errors could be returned for valid, real-world bitstreams. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/dcadec.c')
-rw-r--r--libavcodec/dcadec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index 610857ddf2..7e9463861c 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -1086,12 +1086,12 @@ static int dca_subframe_footer(DCAContext *s, int base_channel)
align_get_bits(&s->gb); // byte align
skip_bits(&s->gb, 16); // nAUXCRC16
- // additional data (reserved, cf. ETSI TS 102 114 V1.4.1)
- if ((reserved = (aux_data_end - get_bits_count(&s->gb))) < 0) {
- av_log(s->avctx, AV_LOG_ERROR,
- "Overread auxiliary data by %d bits\n", -reserved);
- return AVERROR_INVALIDDATA;
- } else if (reserved) {
+ /*
+ * additional data (reserved, cf. ETSI TS 102 114 V1.4.1)
+ *
+ * Note: don't check for overreads, aux_data_count can't be trusted.
+ */
+ if ((reserved = (aux_data_end - get_bits_count(&s->gb))) > 0) {
avpriv_request_sample(s->avctx,
"Core auxiliary data reserved content");
skip_bits_long(&s->gb, reserved);