diff --git a/0001-Fixes-177-NULL-pointer-dereference-in-FindServiceCon.patch b/0001-Fixes-177-NULL-pointer-dereference-in-FindServiceCon.patch new file mode 100644 index 0000000..9aa5da0 --- /dev/null +++ b/0001-Fixes-177-NULL-pointer-dereference-in-FindServiceCon.patch @@ -0,0 +1,54 @@ +From c805c1de1141cb22f74c0d94dd5664bda37398e0 Mon Sep 17 00:00:00 2001 +From: Marcelo Roberto Jimenez +Date: Thu, 4 Jun 2020 12:03:03 -0300 +Subject: [PATCH] Fixes #177: NULL pointer dereference in + FindServiceControlURLPath +References: https://bugzilla.opensuse.org/show_bug.cgi?id=1172625 + +Also fixes its dual bug in FindServiceEventURLPath. +--- + ChangeLog | 6 ++++++ + upnp/src/genlib/service_table/service_table.c | 6 ++++++ + 2 files changed, 12 insertions(+) + +Index: libupnp-1.12.1/ChangeLog +=================================================================== +--- libupnp-1.12.1.orig/ChangeLog ++++ libupnp-1.12.1/ChangeLog +@@ -32,6 +32,12 @@ Version 1.12.1 + + List: Add extern C for C++ users + ++2020-06-04 Patrik Lantz pjlantz(at)github ++ ++ Fixes #177 ++ ++ NULL pointer dereference in FindServiceControlURLPath ++ + ******************************************************************************* + Version 1.12.0 + ******************************************************************************* +Index: libupnp-1.12.1/upnp/src/genlib/service_table/service_table.c +=================================================================== +--- libupnp-1.12.1.orig/upnp/src/genlib/service_table/service_table.c ++++ libupnp-1.12.1/upnp/src/genlib/service_table/service_table.c +@@ -300,6 +300,9 @@ FindServiceEventURLPath( service_table * + uri_type parsed_url; + uri_type parsed_url_in; + ++ if (!table || !eventURLPath) { ++ return NULL; ++ } + if( ( table ) + && + ( parse_uri( eventURLPath, +@@ -352,6 +355,9 @@ FindServiceControlURLPath( service_table + uri_type parsed_url; + uri_type parsed_url_in; + ++ if (!table || !controlURLPath) { ++ return NULL; ++ } + if( ( table ) + && + ( parse_uri diff --git a/libupnp.changes b/libupnp.changes index adfc8cc..1f7cf79 100644 --- a/libupnp.changes +++ b/libupnp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 9 19:08:27 UTC 2020 - Jan Engelhardt + +- Add 0001-Fixes-177-NULL-pointer-dereference-in-FindServiceCon.patch + [boo#1172625] + ------------------------------------------------------------------- Tue Apr 21 17:37:33 UTC 2020 - Michal Vyskocil diff --git a/libupnp.spec b/libupnp.spec index aa1ce15..09879d3 100644 --- a/libupnp.spec +++ b/libupnp.spec @@ -26,11 +26,12 @@ Summary: An implementation of Universal Plug and Play (UPnP) License: BSD-3-Clause Group: Development/Libraries/C and C++ URL: https://github.com/pupnp/pupnp -Source0: https://github.com/pupnp/pupnp/releases/download/release-%version/%name-%version.tar.bz2 -Source1: https://github.com/pupnp/pupnp/releases/download/release-%version/%name-%version.tar.bz2.sha1 -Source42: baselibs.conf +Source: https://github.com/pupnp/pupnp/releases/download/release-%version/%name-%version.tar.bz2 +Source2: https://github.com/pupnp/pupnp/releases/download/release-%version/%name-%version.tar.bz2.sha1 +Source3: baselibs.conf +Patch1: 0001-Fixes-177-NULL-pointer-dereference-in-FindServiceCon.patch BuildRequires: libtool -BuildRequires: pkgconfig +BuildRequires: pkg-config %description The Portable Universal Plug and Play (UPnP) SDK provides support for building @@ -66,7 +67,7 @@ UPnP-compliant control points, devices, and bridges on several operating systems. %prep -%setup -q +%autosetup -p1 %build # the openssl simply does not compile