ALT Linux repos
Group :: Networking/Other
RPM: openslp
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: openslp-2.0.0-CVE-2016-4912.patch
Download
Download
# HG changeset patch
# User John Calcote <john.calcote@gmail.com>
# Date 1491589506 21600
# Fri Apr 07 12:25:06 2017 -0600
# Node ID 2faa881f0616fce98cf239e80989cd650347190d
# Parent 51ed69107d096c5b9886954d89e0709975d5aa15
BUG#152: CVE-2016-4912 - fixed security vulnerability in xrealloc.
diff --git a/openslp/common/slp_xmalloc.c b/openslp/common/slp_xmalloc.c
--- a/openslp/common/slp_xmalloc.c
+++ b/openslp/common/slp_xmalloc.c
@@ -202,8 +202,8 @@
void * newptr = ptr;
if (x->size != size)
{
- newptr = slp_xmalloc(file, line, size);
- memcpy(newptr, ptr, x->size);
+ if ((newptr = slp_xmalloc(file, line, size)) != 0)
+ memcpy(newptr, ptr, x->size);
slp_xfree(file, line, x);
}
return newptr;