From dedbee16b1f831b971a258ef1db49d8663a9ac60 Mon Sep 17 00:00:00 2001 From: Steven Mestdagh <32965539+smestdagh@users.noreply.github.com> Date: Sat, 9 Mar 2019 10:20:47 +0100 Subject: [PATCH] AddAnyPortMapping: check against NULL this avoids a crash in strcasecmp by passing an empty protocol argument --- miniupnpd/upnpsoap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniupnpd/upnpsoap.c b/miniupnpd/upnpsoap.c index acd7fed..8f62c6e 100644 --- a/miniupnpd/upnpsoap.c +++ b/miniupnpd/upnpsoap.c @@ -598,7 +598,7 @@ AddAnyPortMapping(struct upnphttp * h, const char * action, const char * ns) if(leaseduration == 0) leaseduration = 604800; - if (!int_ip || !ext_port || !int_port) + if (!int_ip || !ext_port || !int_port || !protocol) { ClearNameValueList(&data); SoapError(h, 402, "Invalid Args");