summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/openslp/files/openslp-2.0.0-CVE-2016-4912.patch')
-rw-r--r--net-libs/openslp/files/openslp-2.0.0-CVE-2016-4912.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/net-libs/openslp/files/openslp-2.0.0-CVE-2016-4912.patch b/net-libs/openslp/files/openslp-2.0.0-CVE-2016-4912.patch
new file mode 100644
index 000000000000..d8a0eca0d3d3
--- /dev/null
+++ b/net-libs/openslp/files/openslp-2.0.0-CVE-2016-4912.patch
@@ -0,0 +1,15 @@
+Source: https://src.fedoraproject.org/cgit/rpms/openslp.git/plain/openslp-2.0.0-null-pointer-deref.patch
+See also https://bugs.gentoo.org/show_bug.cgi?id=583396
+
+diff -up openslp-2.0.0/common/slp_xmalloc.c.orig openslp-2.0.0/common/slp_xmalloc.c
+--- openslp-2.0.0/common/slp_xmalloc.c.orig 2012-12-07 01:52:08.000000000 +0100
++++ openslp-2.0.0/common/slp_xmalloc.c 2016-05-23 12:58:57.953532979 +0200
+@@ -203,6 +203,8 @@ void * _xrealloc(const char * file, int
+ if (x->size != size)
+ {
+ newptr = _xmalloc(file, line, size);
++ if (newptr == 0)
++ return 0;
+ memcpy(newptr, ptr, x->size);
+ _xfree(file, line, x);
+ }