From: Markus Koschany Date: Wed, 31 Jan 2018 13:48:32 +0000 (+0100) Subject: CVE-2017-14057 X-Git-Tag: archive/raspbian/6%11.12-1_deb8u4+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=41fb11551d8f18cdf05f9f11a403cefbaf38f57f;p=libav.git CVE-2017-14057 Origin: https://github.com/FFmpeg/FFmpeg/commit/7f9ec5593e04827249e7aeb466da06a98a0d7329 Gbp-Pq: Name CVE-2017-14057.patch --- diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 85e800d..1ec36aa 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -683,13 +683,15 @@ static int asf_read_marker(AVFormatContext *s, int64_t size) count = avio_rl32(pb); // markers count avio_rl16(pb); // reserved 2 bytes name_len = avio_rl16(pb); // name length - for (i = 0; i < name_len; i++) - avio_r8(pb); // skip the name + avio_skip(pb, name_len); for (i = 0; i < count; i++) { int64_t pres_time; int name_len; + if (avio_feof(pb)) + return AVERROR_INVALIDDATA; + avio_rl64(pb); // offset, 8 bytes pres_time = avio_rl64(pb); // presentation time pres_time -= asf->hdr.preroll * 10000;