CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
openssl: updated to 1.0.2k
[ports/core-arm.git] / glibc / CVE-2015-8778.patch
CommitLineData
0d473095
VM
1diff --git a/misc/hsearch_r.c b/misc/hsearch_r.c
2index 9f55e84..559df29 100644
3--- a/misc/hsearch_r.c
4+++ b/misc/hsearch_r.c
5@@ -19,7 +19,7 @@
6 #include <errno.h>
7 #include <malloc.h>
8 #include <string.h>
9-
10+#include <stdint.h>
11 #include <search.h>
12
13 /* [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986
14@@ -73,6 +73,13 @@ __hcreate_r (nel, htab)
15 return 0;
16 }
17
18+ if (nel >= SIZE_MAX / sizeof (_ENTRY))
19+ {
20+ __set_errno (ENOMEM);
21+ return 0;
22+ }
23+
24+
25 /* There is still another table active. Return with error. */
26 if (htab->table != NULL)
27 return 0;
28--
291.9.4