HomeFreeBSD

lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray

Description

lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray

Summary:
This makes the code easier to understand and slightly faster,
but requires C23. calloc() would benefit, too, but I didn't
want to touch the imported jemalloc code base.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D52854

Details

Provenance
fuzAuthored on Oct 2 2025, 1:26 PM
Reviewer
kib
Differential Revision
D52854: lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray
Parents
rGa8d774d9708c: man: Conditionally install ar.5 in toolchain package
Branches
Unknown
Tags
Unknown