This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/9.0 in repository ffmpeg.
commit 0e6eef35517af086419c5157980e926a81070c2a Author: Kacper Michajłow <[email protected]> AuthorDate: Sat Jun 27 17:43:33 2026 +0200 Commit: Michael Niedermayer <[email protected]> CommitDate: Tue Jul 21 22:59:53 2026 +0200 avformat/hls: reject Master Playlist tags in a Media Playlist Fixes infinite loop on crafted HLS playlists. Fixes: recursion.m3u8 Fixes: cEy2cxyyPaLH Fixes: cd223e0b4e (Add Apple HTTP Live Streaming demuxer) Found-by: BapToutatis Signed-off-by: Kacper Michajłow <[email protected]> (cherry picked from commit c364ab176f722bdabc886845e770c9eacbc1e3e5) Signed-off-by: Michael Niedermayer <[email protected]> --- libavformat/hls.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libavformat/hls.c b/libavformat/hls.c index b3b8f3a80a..e76e68ed51 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -890,6 +890,12 @@ static int parse_playlist(HLSContext *c, const char *url, while (!avio_feof(in)) { ff_get_chomp_line(in, line, sizeof(line)); if (av_strstart(line, "#EXT-X-STREAM-INF:", &ptr)) { + if (pls) { + av_log(c->ctx, AV_LOG_ERROR, + "Master Playlist tag found in a Media Playlist\n"); + ret = AVERROR_INVALIDDATA; + goto fail; + } is_variant = 1; memset(&variant_info, 0, sizeof(variant_info)); ff_parse_key_value(ptr, handle_variant_args, &variant_info); @@ -909,6 +915,12 @@ static int parse_playlist(HLSContext *c, const char *url, av_strlcpy(key, info.uri, sizeof(key)); } else if (av_strstart(line, "#EXT-X-MEDIA:", &ptr)) { struct rendition_info info = {{0}}; + if (pls) { + av_log(c->ctx, AV_LOG_ERROR, + "Master Playlist tag found in a Media Playlist\n"); + ret = AVERROR_INVALIDDATA; + goto fail; + } ff_parse_key_value(ptr, handle_rendition_args, &info); new_rendition(c, &info, url); } else if (av_strstart(line, "#EXT-X-TARGETDURATION:", &ptr)) { _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
