about summary refs log tree commit diff
path: root/malloc/hooks.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-02-07 22:49:34 +0000
committerUlrich Drepper <drepper@redhat.com>2009-02-07 22:49:34 +0000
commit6dd6a580dff2b88b3bf6a37f59068bbfeb51c97d (patch)
treef3609b33f834af55001e84f6aee52b9eb7941395 /malloc/hooks.c
parent78ac92ad8d6c97c57d09bef01608622706b24f65 (diff)
downloadglibc-6dd6a580dff2b88b3bf6a37f59068bbfeb51c97d.tar.gz
glibc-6dd6a580dff2b88b3bf6a37f59068bbfeb51c97d.tar.xz
glibc-6dd6a580dff2b88b3bf6a37f59068bbfeb51c97d.zip
(_int_realloc): Likewise. Third argument is now padded size
Diffstat (limited to 'malloc/hooks.c')
-rw-r--r--malloc/hooks.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/malloc/hooks.c b/malloc/hooks.c
index 537995aeab..9659ec5fbe 100644
--- a/malloc/hooks.c
+++ b/malloc/hooks.c
@@ -354,8 +354,11 @@ realloc_check(oldmem, bytes, caller)
     }
   } else {
 #endif /* HAVE_MMAP */
-    if (top_check() >= 0)
-      newmem = _int_realloc(&main_arena, oldp, bytes+1);
+    if (top_check() >= 0) {
+      INTERNAL_SIZE_T nb;
+      checked_request2size(bytes + 1, nb);
+      newmem = _int_realloc(&main_arena, oldp, nb);
+    }
 #if 0 /* Erase freed memory. */
     if(newmem)
       newp = mem2chunk(newmem);