about summary refs log tree commit diff
path: root/malloc/malloc.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-12 21:10:45 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-12 21:10:45 +0000
commit3ea1b82e6bb75e69f05c3e4c90e21210598b0174 (patch)
treea249cca597ce991f88c7322be2dd300ead12a20e /malloc/malloc.c
parentaee4670499f3141b2ea68c62b3a08980b154a568 (diff)
downloadglibc-3ea1b82e6bb75e69f05c3e4c90e21210598b0174.tar.gz
glibc-3ea1b82e6bb75e69f05c3e4c90e21210598b0174.tar.xz
glibc-3ea1b82e6bb75e69f05c3e4c90e21210598b0174.zip
Update.
	* malloc/malloc.c (cALLOc): Clear only what the user asked for and
	avoid writing over boundary.
	Patch by Greg McGary <gkm@eng.ascend.com>.
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r--malloc/malloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index f674f4ebfe..2351963838 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -3738,7 +3738,7 @@ Void_t* cALLOc(n, elem_size) size_t n; size_t elem_size;
   }
 #endif
 
-  MALLOC_ZERO(mem, csz - SIZE_SZ);
+  MALLOC_ZERO(mem, cs);
   return mem;
 }