r5861 - glibc-package/branches/eglibc-2.18/debian/patches/any
Author: aurel32
Date: 2013-12-03 20:31:45 +0000 (Tue, 03 Dec 2013)
New Revision: 5861
Modified:
glibc-package/branches/eglibc-2.18/debian/patches/any/cvs-CVE-2013-4332-memalign-2.diff
Log:
Refresh the patch to make dpkg-source happy
Modified: glibc-package/branches/eglibc-2.18/debian/patches/any/cvs-CVE-2013-4332-memalign-2.diff
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/patches/any/cvs-CVE-2013-4332-memalign-2.diff 2013-12-03 20:20:00 UTC (rev 5860)
+++ glibc-package/branches/eglibc-2.18/debian/patches/any/cvs-CVE-2013-4332-memalign-2.diff 2013-12-03 20:31:45 UTC (rev 5861)
@@ -12,7 +12,7 @@
--- a/malloc/hooks.c
+++ b/malloc/hooks.c
-@@ -361,10 +361,13 @@ memalign_check(size_t alignment, size_t bytes, const void *caller)
+@@ -361,10 +361,21 @@
if (alignment <= MALLOC_ALIGNMENT) return malloc_check(bytes, NULL);
if (alignment < MINSIZE) alignment = MINSIZE;
@@ -20,6 +20,14 @@
- __set_errno (ENOMEM);
- return NULL;
- }
++ /* If the alignment is greater than SIZE_MAX / 2 + 1 it cannot be a
++ power of 2 and will cause overflow in the check below. */
++ if (alignment > SIZE_MAX / 2 + 1)
++ {
++ __set_errno (EINVAL);
++ return 0;
++ }
++
+ /* Check for overflow. */
+ if (bytes > SIZE_MAX - alignment - MINSIZE)
+ {
@@ -30,29 +38,9 @@
(void)mutex_lock(&main_arena.mutex);
mem = (top_check() >= 0) ? _int_memalign(&main_arena, alignment, bytes+1) :
NULL;
- 2013-10-30 Ondřej Bílka <neleai@seznam.cz>
-
- [BZ #11087]
---- a/malloc/hooks.c
-+++ b/malloc/hooks.c
-@@ -361,6 +361,14 @@ memalign_check(size_t alignment, size_t bytes, const void *caller)
- if (alignment <= MALLOC_ALIGNMENT) return malloc_check(bytes, NULL);
- if (alignment < MINSIZE) alignment = MINSIZE;
-
-+ /* If the alignment is greater than SIZE_MAX / 2 + 1 it cannot be a
-+ power of 2 and will cause overflow in the check below. */
-+ if (alignment > SIZE_MAX / 2 + 1)
-+ {
-+ __set_errno (EINVAL);
-+ return 0;
-+ }
-+
- /* Check for overflow. */
- if (bytes > SIZE_MAX - alignment - MINSIZE)
- {
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
-@@ -3016,6 +3016,14 @@ __libc_memalign(size_t alignment, size_t bytes)
+@@ -3015,6 +3015,14 @@
/* Otherwise, ensure that it is at least a minimum chunk size */
if (alignment < MINSIZE) alignment = MINSIZE;
@@ -67,4 +55,3 @@
/* Check for overflow. */
if (bytes > SIZE_MAX - alignment - MINSIZE)
{
-
Reply to: