[EXTERNAL] Re: Newlib's strtol() is not standard-compliant
Jeff Johnston
jjohnstn@redhat.com
Tue Sep 15 15:11:49 GMT 2026
Your tweak makes sense, thanks. Compared against glibc with some extra
examples with sign and whitespace.
-- Jeff J.
On Mon, Sep 14, 2026 at 10:35 PM Lavrentiev, Anton (NIH/NLM/NCBI) [C] <
lavr@ncbi.nlm.nih.gov> wrote:
> > A fix has been pushed to main.
> >
> > -- Jeff J.
>
> Thanks. I checked the fix but unfortunately it does not seem to be
> complete:
>
> "nptr" is not tracking the leading whitespace and / or a sign
> that might appear prior to "0x". So endptr is not going to
> receive a correct value, in either or both of those cases.
>
> Maybe to assign "nptr" with the value of "s" (before bumping it by 2)
> instead of doing just the ++ increment?
>
> Anton Lavrentiev
> Contractor NIH/NLM/NCBI
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/newlib/attachments/20260915/b421ef73/attachment.htm>
More information about the Newlib
mailing list