Handle NULL input to malloc_usable_size [BZ #28506]
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Fri, 29 Oct 2021 09:23:55 +0000 (14:53 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Fri, 29 Oct 2021 09:23:55 +0000 (14:53 +0530)
commit88e316b06414ee7c944cd6f8b30b07a972b78499
tree9ce83580993906710f832135a2efdbecefc6c767
parent1d56fd3baeaa67405b8a1d67275b4c6eecac77b8
Handle NULL input to malloc_usable_size [BZ #28506]

Hoist the NULL check for malloc_usable_size into its entry points in
malloc-debug and malloc and assume non-NULL in all callees.  This fixes
BZ #28506

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
malloc/malloc-debug.c
malloc/malloc.c
malloc/tst-malloc-usable.c