Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 13 Oct 2021 16:28:45 +0200
From: Jₑₙₛ Gustedt <>
To: "(GalaxyMaster)" <>
Subject: Re: strtoll() incompatibility


on Wed, 13 Oct 2021 14:06:27 +0000 you ("(GalaxyMaster)"
<>) wrote:

> Hello,
> I am not a true developer, so I don't have the POSIX standard handy,
> hence could not quickly find whether the observed behaviour is
> correct or not.  I have two systems, one is musl-based and the other
> is Glibc-based, so every time I stumble upon something I check
> against Glibc.  I know that Glibc developers did quite a few bespoke
> things, but this particular one made me wonder whether it is a bug in
> musl.
> Longs story short, it seems that musl's strto*() set errno when it is
> unable to find a legitimate number at the begining of the string:
> ...

This function is actually in C, but the possible `errno` specification
comes seemingly from POSIX:

       The implementation may also set errno to EINVAL in case no
       conversion was performed (no digits seen, and 0 returned).


:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: ::

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.