summaryrefslogtreecommitdiffstats
path: root/patches/glibc-2.18/0011-malloc-Check-for-integer-overflow-in-valloc.patch
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-09-10 10:33:54 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-12-12 08:15:35 +0100
commitf93e4506937afafa325bd530de3fc39c7399963a (patch)
treec2d5b6a24769e649c4c9a6e8d5e0ac30cb2d5f9b /patches/glibc-2.18/0011-malloc-Check-for-integer-overflow-in-valloc.patch
parentfc513961e38f5307df71d171b084aba171ff462e (diff)
downloadOSELAS.Toolchain-f93e4506937afafa325bd530de3fc39c7399963a.tar.gz
OSELAS.Toolchain-f93e4506937afafa325bd530de3fc39c7399963a.tar.xz
glibc: update patches 2.18 -> 2.20
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/glibc-2.18/0011-malloc-Check-for-integer-overflow-in-valloc.patch')
-rw-r--r--patches/glibc-2.18/0011-malloc-Check-for-integer-overflow-in-valloc.patch37
1 files changed, 0 insertions, 37 deletions
diff --git a/patches/glibc-2.18/0011-malloc-Check-for-integer-overflow-in-valloc.patch b/patches/glibc-2.18/0011-malloc-Check-for-integer-overflow-in-valloc.patch
deleted file mode 100644
index 1a29ffb..0000000
--- a/patches/glibc-2.18/0011-malloc-Check-for-integer-overflow-in-valloc.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From: Will Newton <will.newton@linaro.org>
-Date: Fri, 16 Aug 2013 11:59:37 +0100
-Subject: [PATCH] malloc: Check for integer overflow in valloc.
-
-A large bytes parameter to valloc could cause an integer overflow
-and corrupt allocator internals. Check the overflow does not occur
-before continuing with the allocation.
-
-ChangeLog:
-
-2013-09-11 Will Newton <will.newton@linaro.org>
-
- [BZ #15856]
- * malloc/malloc.c (__libc_valloc): Check the value of bytes
- does not overflow.
----
- malloc/malloc.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/malloc/malloc.c b/malloc/malloc.c
-index bcc08c4..31e2dfa 100644
---- a/malloc/malloc.c
-+++ b/malloc/malloc.c
-@@ -3046,6 +3046,13 @@ __libc_valloc(size_t bytes)
-
- size_t pagesz = GLRO(dl_pagesize);
-
-+ /* Check for overflow. */
-+ if (bytes > SIZE_MAX - pagesz - MINSIZE)
-+ {
-+ __set_errno (ENOMEM);
-+ return 0;
-+ }
-+
- void *(*hook) (size_t, size_t, const void *) =
- force_reg (__memalign_hook);
- if (__builtin_expect (hook != NULL, 0))