Fix possible segfault in miniupnp.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9041 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
cd577664ca
commit
4379fdcbd0
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue