|
From: | Paul Eggert |
Subject: | Re: New function xpalloc in module xalloc |
Date: | Tue, 6 Apr 2021 12:05:09 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |