From 29b742d3a76eb8f36b1fe93aec101f2b4fcd14f3 Mon Sep 17 00:00:00 2001
From: Francois Cartegnie <fcvlcdev@free.fr>
Date: Wed, 20 Apr 2022 15:13:58 +0200
Subject: [PATCH] sout: udp: fix segfault parsing config chain

ex: --sout="{foo}"
---
 modules/stream_out/udp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_out/udp.c b/modules/stream_out/udp.c
index 37816d7b0972..512b258b691c 100644
--- a/modules/stream_out/udp.c
+++ b/modules/stream_out/udp.c
@@ -231,7 +231,7 @@ static int Open(vlc_object_t *obj)
              if (strcmp(c->psz_name, "access") == 0)
                  break;
 
-        if (c == NULL) /* default is file, not for us */
+        if (c == NULL || c->psz_value == NULL) /* default is file, not for us */
             return VLC_ENOTSUP;
         if (strcmp(c->psz_value, "udp"))
             return VLC_ENOTSUP;
-- 
GitLab