[arch-commits] Commit in libupnp/repos/extra-x86_64 (3 files)
Jelle van der Waa
jelle at archlinux.org
Tue Jan 9 20:17:13 UTC 2018
Date: Tuesday, January 9, 2018 @ 20:17:12
Author: jelle
Revision: 314303
archrelease: copy trunk to extra-x86_64
Added:
libupnp/repos/extra-x86_64/PKGBUILD
(from rev 314302, libupnp/trunk/PKGBUILD)
libupnp/repos/extra-x86_64/segfault_http_makemessage.patch
(from rev 314302, libupnp/trunk/segfault_http_makemessage.patch)
Deleted:
libupnp/repos/extra-x86_64/PKGBUILD
---------------------------------+
PKGBUILD | 65 +++++++++++++++++++++-----------------
segfault_http_makemessage.patch | 45 ++++++++++++++++++++++++++
2 files changed, 81 insertions(+), 29 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2018-01-09 20:16:44 UTC (rev 314302)
+++ PKGBUILD 2018-01-09 20:17:12 UTC (rev 314303)
@@ -1,29 +0,0 @@
-# $Id$
-# Maintainer: Giovanni Scafora <giovanni at archlinux.org>
-# Contributor: kastor <kastor at fobos.org.ar>
-
-pkgname=libupnp
-pkgver=1.6.24
-pkgrel=1
-pkgdesc="Portable Open Source UPnP Development Kit"
-arch=('x86_64')
-url="http://pupnp.sourceforge.net/"
-license=('BSD')
-depends=('glibc')
-makedepends=('pkgconfig')
-source=("http://downloads.sourceforge.net/sourceforge/pupnp/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('c5f4a3b674741d85ef29258841ccd540')
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- ./configure --prefix=/usr
- make
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- make DESTDIR=${pkgdir} install
- install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
-}
Copied: libupnp/repos/extra-x86_64/PKGBUILD (from rev 314302, libupnp/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2018-01-09 20:17:12 UTC (rev 314303)
@@ -0,0 +1,36 @@
+# $Id$
+# Maintainer: Giovanni Scafora <giovanni at archlinux.org>
+# Contributor: kastor <kastor at fobos.org.ar>
+
+pkgname=libupnp
+pkgver=1.6.24
+pkgrel=2
+pkgdesc="Portable Open Source UPnP Development Kit"
+arch=('x86_64')
+url="http://pupnp.sourceforge.net/"
+license=('BSD')
+depends=('glibc')
+makedepends=('pkgconfig')
+source=("http://downloads.sourceforge.net/sourceforge/pupnp/${pkgname}-${pkgver}.tar.bz2"
+ "segfault_http_makemessage.patch")
+md5sums=('c5f4a3b674741d85ef29258841ccd540'
+ 'b5ab030107cadfb307dc1b809b7a5fe3')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i $srcdir/segfault_http_makemessage.patch
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR=${pkgdir} install
+ install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+}
Copied: libupnp/repos/extra-x86_64/segfault_http_makemessage.patch (from rev 314302, libupnp/trunk/segfault_http_makemessage.patch)
===================================================================
--- segfault_http_makemessage.patch (rev 0)
+++ segfault_http_makemessage.patch 2018-01-09 20:17:12 UTC (rev 314303)
@@ -0,0 +1,45 @@
+From 70e3d626378e12ea50d76dfda50311c8bb4a2a78 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause at embedded.rocks>
+Date: Tue, 5 Dec 2017 11:29:44 +0100
+Subject: [PATCH] Fix segmentation fault in http_MakeMessage
+
+When upmpdcli is linked with libupnp 1.6.24 it fails with an
+segmentation fault, but linking with libupnp worked just fine.
+
+git bisect shows that commit 9c2e8ec8a0291ebe81959009e2f78edbdb47ced5 is
+the bad one as the variable `extras` is not properly checked before
+attempting to used it as a pointer.
+
+Asure `extras` is not Null before using it.
+---
+ upnp/src/genlib/net/http/httpreadwrite.c | 16 +++++++++-------
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/upnp/src/genlib/net/http/httpreadwrite.c b/upnp/src/genlib/net/http/httpreadwrite.c
+index 68cd4baa..57ab8051 100644
+--- a/upnp/src/genlib/net/http/httpreadwrite.c
++++ b/upnp/src/genlib/net/http/httpreadwrite.c
+@@ -1662,14 +1662,16 @@ int http_MakeMessage(membuffer *buf, int http_major_version,
+ struct Extra_Headers *extras;
+ /* array of extra headers */
+ extras = (struct Extra_Headers *) va_arg(argp, struct Extra_Headers *);
+- while (extras->name) {
+- if (extras->resp) {
+- if (membuffer_append(buf, extras->resp, strlen(extras->resp)))
+- goto error_handler;
+- if (membuffer_append(buf, "\r\n", (size_t)2))
+- goto error_handler;
++ if (extras) {
++ while (extras->name) {
++ if (extras->resp) {
++ if (membuffer_append(buf, extras->resp, strlen(extras->resp)))
++ goto error_handler;
++ if (membuffer_append(buf, "\r\n", (size_t)2))
++ goto error_handler;
++ }
++ extras++;
+ }
+- extras++;
+ }
+ }
+ if (c == 's') {
More information about the arch-commits
mailing list