avformat/hls: Fix DoS due to infinite loop
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 25 Aug 2017 23:26:58 +0000 (01:26 +0200)
committerMike Gabriel <sunweaver@debian.org>
Sat, 30 Mar 2019 20:44:13 +0000 (20:44 +0000)
commitdd86993c30d08764c9730473d8c92d2b28296c70
tree6034b9551d942dd4425f145d784c213618fc385f
parent32ddfff85fc203dffd1f7a4827e9ae47e9b139be
avformat/hls: Fix DoS due to infinite loop

Fixes: loop.m3u
The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome

Found-by: Xiaohei and Wangchu from Alibaba Security Team
Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
[sunweaver] Rebased against a libavformat/hls.c version that did not yet have AVOption support.
            Initializing HLS_Context.max_reload statically with the value 1000.

Gbp-Pq: Name CVE-2017-14058.patch
libavformat/hls.c