mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
* malloc/malloc.c (request2size): Take care of overflow in addition.
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
1999-07-07 Ulrich Drepper <drepper@cygnus.com>
|
1999-07-07 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* malloc/malloc.c (request2size): Take care of overflow in
|
||||||
|
addition.
|
||||||
|
|
||||||
* sysdeps/posix/getcwd.c: Correct last patch. Handle getcwd
|
* sysdeps/posix/getcwd.c: Correct last patch. Handle getcwd
|
||||||
(NULL, != 0) correctly.
|
(NULL, != 0) correctly.
|
||||||
|
|
||||||
|
@ -1263,8 +1263,9 @@ static void free_atfork();
|
|||||||
|
|
||||||
#define request2size(req, nb) \
|
#define request2size(req, nb) \
|
||||||
((nb = (req) + (SIZE_SZ + MALLOC_ALIGN_MASK)),\
|
((nb = (req) + (SIZE_SZ + MALLOC_ALIGN_MASK)),\
|
||||||
((long)nb <= 0 ? 1 : ((nb < (MINSIZE + MALLOC_ALIGN_MASK) ? (nb = MINSIZE) :\
|
((long)nb <= 0 || nb < (INTERNAL_SIZE_T) (req) \
|
||||||
(nb &= ~MALLOC_ALIGN_MASK)), 0)))
|
? 1 : ((nb < (MINSIZE + MALLOC_ALIGN_MASK) \
|
||||||
|
? (nb = MINSIZE) : (nb &= ~MALLOC_ALIGN_MASK)), 0)))
|
||||||
|
|
||||||
/* Check if m has acceptable alignment */
|
/* Check if m has acceptable alignment */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user