From 3b8681fc66da653d5e22c70f2a7f66338d67cde6 Mon Sep 17 00:00:00 2001
From: Kevin Darbyshire-Bryant <kdarbyshirebryant@users.noreply.github.com>
Date: Sat, 20 May 2017 09:16:21 +0100
Subject: [PATCH] miniupnpc: bump to 2.0.20170509 (#4362)

Fix CVE-2017-8798

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
---
 net/miniupnpc/Makefile                          | 4 ++--
 net/miniupnpc/patches/100-no_minixml_test.patch | 2 +-
 net/miniupnpc/patches/200-miniupnpc_desc.patch  | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/miniupnpc/Makefile b/net/miniupnpc/Makefile
index 9ea93636a..c41766a48 100644
--- a/net/miniupnpc/Makefile
+++ b/net/miniupnpc/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=miniupnpc
-PKG_VERSION:=2.0.20161216
+PKG_VERSION:=2.0.20170509
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=http://miniupnp.free.fr/files
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=01e14408d6fc628de9afabc4417b84adeaba4c0ec517e7b8e278cb2993dafd3e
+PKG_HASH:=d3c368627f5cdfb66d3ebd64ca39ba54d6ff14a61966dbecb8dd296b7039f16a
 PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
 
 PKG_INSTALL:=1
diff --git a/net/miniupnpc/patches/100-no_minixml_test.patch b/net/miniupnpc/patches/100-no_minixml_test.patch
index 93f6772c7..dd8d029ff 100644
--- a/net/miniupnpc/patches/100-no_minixml_test.patch
+++ b/net/miniupnpc/patches/100-no_minixml_test.patch
@@ -1,6 +1,6 @@
 --- a/Makefile
 +++ b/Makefile
-@@ -151,8 +151,8 @@ installpythonmodule3:	pythonmodule3
+@@ -187,8 +187,8 @@ installpythonmodule3:	pythonmodule3
  	python3 setup.py install
  
  validateminixml:	minixmlvalid
diff --git a/net/miniupnpc/patches/200-miniupnpc_desc.patch b/net/miniupnpc/patches/200-miniupnpc_desc.patch
index 320707ef2..c9a5abc58 100644
--- a/net/miniupnpc/patches/200-miniupnpc_desc.patch
+++ b/net/miniupnpc/patches/200-miniupnpc_desc.patch
@@ -1,6 +1,6 @@
 --- a/upnpcommands.c
 +++ b/upnpcommands.c
-@@ -367,7 +367,7 @@ UPNP_AddPortMapping(const char * control
+@@ -370,7 +370,7 @@ UPNP_AddPortMapping(const char * control
  	AddPortMappingArgs[5].elt = "NewEnabled";
  	AddPortMappingArgs[5].val = "1";
  	AddPortMappingArgs[6].elt = "NewPortMappingDescription";
@@ -8,4 +8,4 @@
 +	AddPortMappingArgs[6].val = desc?desc:"miniupnpc";
  	AddPortMappingArgs[7].elt = "NewLeaseDuration";
  	AddPortMappingArgs[7].val = leaseDuration?leaseDuration:"0";
- 	if(!(buffer = simpleUPnPcommand(-1, controlURL, servicetype,
+ 	buffer = simpleUPnPcommand(-1, controlURL, servicetype,