upnpcommands.c: fixes potential null dereference. Fix #046

This commit is contained in:
Thomas Bernard 2013-12-09 09:30:53 +01:00
parent 3ae6b969a3
commit 81f57226eb
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $Id: upnpcommands.c,v 1.40 2012/06/23 22:36:35 nanard Exp $ */ /* $Id: upnpcommands.c,v 1.41 2013/12/09 08:18:23 nanard Exp $ */
/* Project : miniupnp /* Project : miniupnp
* Author : Thomas Bernard * Author : Thomas Bernard
* Copyright (c) 2005-2012 Thomas Bernard * Copyright (c) 2005-2012 Thomas Bernard
@ -759,7 +759,7 @@ UPNP_GetFirewallStatus(const char * controlURL,
char * fe, *ipa, *p; char * fe, *ipa, *p;
int ret = UPNPCOMMAND_UNKNOWN_ERROR; int ret = UPNPCOMMAND_UNKNOWN_ERROR;
if(!firewallEnabled && !inboundPinholeAllowed) if(!firewallEnabled || !inboundPinholeAllowed)
return UPNPCOMMAND_INVALID_ARGS; return UPNPCOMMAND_INVALID_ARGS;
buffer = simpleUPnPcommand(-1, controlURL, servicetype, buffer = simpleUPnPcommand(-1, controlURL, servicetype,