On Sun, 1 Nov 2020 11:17:42 +0100
Quentin Rameau wrote:
Dear Quentin,
> SIZE_MAX is the tangible guarantee for the upper limit of size_t.
indeed, but strtonum's maxval argument is a signed long long, and given
size_t can be unsigned long long, we could overflow it.
With best regards
Laslo
> Make sure not to overflow the long long value. Given the standard
> doesn't bring any tangible guarantees for the upper limits of size_t,
SIZE_MAX is the tangible guarantee for the upper limit of size_t.
commit 7d26fc695d548b5a73305a97dce274a313e0f602
Author: Laslo Hunhold
AuthorDate: Sun Nov 1 01:47:11 2020 +0100
Commit: Laslo Hunhold
CommitDate: Sun Nov 1 01:49:27 2020 +0100
Prevent overflow in strtonum()-parameters
Make sure not to overflow the long long value. Given the