On 4/5/21 11:48 PM, Marc Nieper-Wißkirchen wrote:
SIZE_MAX < (uintmax_t) nbytes
Eeuuw! That's a cure worse than the disease. Among other things, there is no guarantee that PTRDIFF_MAX <= UINTMAX_MAX so in theory the comparison could go completely awry with a sufficiently-large NBYTES.
"Don't use casts." Words to live by.