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