[vlc-devel] [PATCH] sd: upnp: parseSatipServer: add missing error check
Filip Roséen
filip at atch.se
Tue Jul 31 14:44:16 CEST 2018
Prevents a potential null-dereference on the line that follows.
---
modules/services_discovery/upnp.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index b72ad208a1..14778cd2fa 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -572,6 +572,9 @@ MediaServerList::parseSatipServer( IXML_Element* p_device_element, const char *p
psz_satip_channellist = strdup("Auto");
}
+ if( unlikely( !psz_satip_channellist ) )
+ return;
+
/* Part 1: a user may have provided a custom playlist url */
if (strncmp(psz_satip_channellist, "CustomList", 10) == 0) {
char *psz_satip_playlist_url = config_GetPsz( "satip-channellist-url" );
--
2.18.0
More information about the vlc-devel
mailing list