For small allocations (chunk) freezero only validates the given
authorotto <otto@openbsd.org>
Sat, 22 Apr 2017 09:12:49 +0000 (09:12 +0000)
committerotto <otto@openbsd.org>
Sat, 22 Apr 2017 09:12:49 +0000 (09:12 +0000)
commite825de79df20ff7ad493d85dd9adfbfac4020cd0
tree7c1b27722974c00404fc46e042c5d2aabc6d3562
parent0e2c9d0f0effc1d2ee144f302bcdacd2fbafa082
For small allocations (chunk) freezero only validates the given
size if canaries are enabled. In that case we have the exact requested
size of the allocation.  But we can at least check the given size
against the chunk size if C is not enabled. Plus add some braces
so my brain doesn't have to scan for dangling else problems when I
see this code.
lib/libc/stdlib/malloc.c