From 4379fdcbd08a1d37baac068885e53ef511ade1b3 Mon Sep 17 00:00:00 2001 From: Christian Ohm Date: Thu, 7 Jan 2010 19:07:03 +0000 Subject: [PATCH] Fix possible segfault in miniupnp. git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9041 4a71c877-e1ca-e34f-864e-861f7616d084 --- lib/netplay/miniupnpc/miniwget.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/netplay/miniupnpc/miniwget.c b/lib/netplay/miniupnpc/miniwget.c index 51a371ad5..cc053abb1 100644 --- a/lib/netplay/miniupnpc/miniwget.c +++ b/lib/netplay/miniupnpc/miniwget.c @@ -234,6 +234,9 @@ miniwget2(const char * url, const char * host, int parseURL(const char * url, char * hostname, unsigned short * port, char * * path) { char * p1, *p2, *p3; + + if (!url) + return 0; p1 = strstr(url, "://"); if(!p1) return 0;