From 81f57226eb76c1ab03c25e8f762539fb03ea9f5b Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Mon, 9 Dec 2013 09:30:53 +0100 Subject: [PATCH] upnpcommands.c: fixes potential null dereference. Fix #046 --- miniupnpc/upnpcommands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniupnpc/upnpcommands.c b/miniupnpc/upnpcommands.c index 662c10b..76d2d8a 100644 --- a/miniupnpc/upnpcommands.c +++ b/miniupnpc/upnpcommands.c @@ -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 * Author : Thomas Bernard * Copyright (c) 2005-2012 Thomas Bernard @@ -759,7 +759,7 @@ UPNP_GetFirewallStatus(const char * controlURL, char * fe, *ipa, *p; int ret = UPNPCOMMAND_UNKNOWN_ERROR; - if(!firewallEnabled && !inboundPinholeAllowed) + if(!firewallEnabled || !inboundPinholeAllowed) return UPNPCOMMAND_INVALID_ARGS; buffer = simpleUPnPcommand(-1, controlURL, servicetype,