Re: [PATCH v1] man/man3/strtoul.3: BUGS: Signed numbers are not rejected
From: Bruno Haible <hidden>
Date: 2025-03-21 21:31:48
From: Bruno Haible <hidden>
Date: 2025-03-21 21:31:48
Alejandro Colomar wrote:
This is one of the patches I will apply after your report. Please review.
Looks good to me, except for one line in the sample:
+ if (!isxdigit((unsigned char) *s))
For a general base, this should be
if (!isalnum((unsigned char) *s))
For base <= 16, it can be simplified to
if (!isxdigit((unsigned char) *s))
For base <= 10, it can be simplified to
if (!isdigit((unsigned char) *s))
Bruno