Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker/build-gstreamer/compile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ git apply /compile-patch/0001-pad-Check-data-NULL-ness-when-probes-are-stopped-f
git apply /compile-patch/0001-Reduce-logs-verbosity-in-webrtcbin-when-a-FEC-decode.patch
git apply /compile-patch/0001-glvideomixer-update-API-to-be-compatible-with-versio.patch
git apply /compile-patch/0001-GstAudioAggregator-fix-structure-unref.patch
git apply /compile-patch/0001-libnice.wrap-fix-incomplete-TCP-ICE-candidate-crash.patch

# This is needed for other plugins to be built properly
ninja -C build install
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
From 99c642e9de04964ac6ae3c9aa50b28b134ae8496 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Le=20Page?= <llepage@igalia.com>
Date: Mon, 20 Oct 2025 14:17:38 +0200
Subject: [PATCH] libnice.wrap: fix incomplete TCP ICE candidate crash

---
subprojects/libnice.wrap | 1 +
...sing-an-incomplete-TCP-ICE-candidate.patch | 30 +++++++++++++++++++
2 files changed, 31 insertions(+)
create mode 100644 subprojects/packagefiles/libnice-0.1.21/0001-agent-fix-parsing-an-incomplete-TCP-ICE-candidate.patch

diff --git a/subprojects/libnice.wrap b/subprojects/libnice.wrap
index eeed32daa2..2dc672b27b 100644
--- a/subprojects/libnice.wrap
+++ b/subprojects/libnice.wrap
@@ -2,3 +2,4 @@
directory=libnice
url=https://gitlab.freedesktop.org/libnice/libnice.git
revision=0.1.21
+diff_files = libnice-0.1.21/0001-agent-fix-parsing-an-incomplete-TCP-ICE-candidate.patch
diff --git a/subprojects/packagefiles/libnice-0.1.21/0001-agent-fix-parsing-an-incomplete-TCP-ICE-candidate.patch b/subprojects/packagefiles/libnice-0.1.21/0001-agent-fix-parsing-an-incomplete-TCP-ICE-candidate.patch
new file mode 100644
index 0000000000..8dec6b9948
--- /dev/null
+++ b/subprojects/packagefiles/libnice-0.1.21/0001-agent-fix-parsing-an-incomplete-TCP-ICE-candidate.patch
@@ -0,0 +1,30 @@
+From d5f6db4100fedb01f62909ee342a8ccaa1274431 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lo=C3=AFc=20Le=20Page?= <llepage@igalia.com>
+Date: Mon, 20 Oct 2025 13:31:54 +0200
+Subject: [PATCH] agent: fix parsing an incomplete TCP ICE candidate
+
+If a TCP ICE candidate mline in a SDP doesn't specify the `tcptype`
+field, it was crashing the agent because of the non-null assert in
+`g_ascii_strcasecmp`. The patch is just ignoring an incomplete TCP
+candidate just like the other malformed candidates.
+---
+ agent/agent.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/agent/agent.c b/agent/agent.c
+index 0d1f1814..7d22e22b 100644
+--- a/agent/agent.c
++++ b/agent/agent.c
+@@ -7613,6 +7613,9 @@ nice_agent_parse_remote_candidate_sdp (NiceAgent *agent, guint stream_id,
+ else if (g_ascii_strcasecmp (transport, "TCP-PASS") == 0)
+ ctransport = NICE_CANDIDATE_TRANSPORT_TCP_PASSIVE;
+ else if (g_ascii_strcasecmp (transport, "TCP") == 0) {
++ if (tcptype == NULL)
++ goto done;
++
+ if (g_ascii_strcasecmp (tcptype, "so") == 0)
+ ctransport = NICE_CANDIDATE_TRANSPORT_TCP_SO;
+ else if (g_ascii_strcasecmp (tcptype, "active") == 0)
+--
+2.43.0
+
--
2.43.0