(cALLOc): Clear only what the user asked for and avoid writing over boundary.
authordrepper <drepper>
Wed, 12 Apr 2000 21:09:53 +0000 (21:09 +0000)
committerdrepper <drepper>
Wed, 12 Apr 2000 21:09:53 +0000 (21:09 +0000)
malloc/malloc.c

index f674f4e..2351963 100644 (file)
@@ -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;
 }