Fix possible segfault in miniupnp.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9041 4a71c877-e1ca-e34f-864e-861f7616d084
master
Christian Ohm 2010-01-07 19:07:03 +00:00 committed by Git SVN Gateway
parent cd577664ca
commit 4379fdcbd0
1 changed files with 3 additions and 0 deletions

View File

@ -234,6 +234,9 @@ miniwget2(const char * url, const char * host,
int parseURL(const char * url, char * hostname, unsigned short * port, char * * path) int parseURL(const char * url, char * hostname, unsigned short * port, char * * path)
{ {
char * p1, *p2, *p3; char * p1, *p2, *p3;
if (!url)
return 0;
p1 = strstr(url, "://"); p1 = strstr(url, "://");
if(!p1) if(!p1)
return 0; return 0;