This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.0 in repository ffmpeg.
commit 6350cd623bc5bda62c2a6489f8536efc9fced1e1 Author: Jack Lau <[email protected]> AuthorDate: Thu Sep 4 07:49:41 2025 +0800 Commit: Jack Lau <[email protected]> CommitDate: Tue Feb 10 09:32:56 2026 +0000 avformat/whip: fix SDP ICE candidates parsing fix issue #20407 Refer to RFC 5245 15.1, the foundation may be any string up to 32 chars. The old code could misread foundations as transport("udp"). This patch fully parse all these attr to avoid parsing error. Signed-off-by: Jack Lau <[email protected]> (cherry picked from commit b41f8207c4cfebf9bb6b66a9f354c8bbba3036b5) --- libavformat/whip.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index ee88e7b0ac..885dc8acbb 100644 --- a/libavformat/whip.c +++ b/libavformat/whip.c @@ -880,12 +880,12 @@ static int parse_answer(AVFormatContext *s) goto end; } } else if (av_strstart(line, "a=candidate:", &ptr) && !whip->ice_protocol) { - ptr = av_stristr(ptr, "udp"); if (ptr && av_stristr(ptr, "host")) { - char protocol[17], host[129]; - int priority, port; - ret = sscanf(ptr, "%16s %d %128s %d typ host", protocol, &priority, host, &port); - if (ret != 4) { + /* Refer to RFC 5245 15.1 */ + char foundation[33], protocol[17], host[129]; + int component_id, priority, port; + ret = sscanf(ptr, "%32s %d %16s %d %128s %d typ host", foundation, &component_id, protocol, &priority, host, &port); + if (ret != 6) { av_log(whip, AV_LOG_ERROR, "Failed %d to parse line %d %s from %s\n", ret, i, line, whip->sdp_answer); ret = AVERROR(EIO); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
