2005-10-12 Ulrich Drepper <drepper@redhat.com>
+ * malloc/malloc.c (_int_free): Fail if block size is obviously wrong.
+
* include/malloc.h: Remove _int_new_arena prototype.
* malloc/arena.c (_int_new_arena): Move definition ahead of
arena_get2 and make static.
malloc_printerr (check_action, errstr, mem);
return;
}
+ /* We know that each chunk is at least MINSIZE bytes in size. */
+ if (__builtin_expect (size < MINSIZE, 0))
+ {
+ errstr = "free(): invalid size";
+ goto errout;
+ }
check_inuse_chunk(av, p);