Hi Mark,
> I guess the idea is that there could be an atoi implementation that
> starts from the end of the string? But I think that is super unlikely
> since atoi (and strtol) is defined on the initial portion of the
> character array. The algorithm is described as working from the start
> and on
Hi Evgeny,
On Fri, Mar 18, 2022 at 12:11:50PM +0300, Evgeny Vereshchagin wrote:
> > The ar_size field is a 10 character string, not zero terminated, of
> > decimal digits right padded with spaces. Make sure it actually starts
> > with a digit before calling atol on it. We already make sure it is
Hi,
> The ar_size field is a 10 character string, not zero terminated, of
> decimal digits right padded with spaces. Make sure it actually starts
> with a digit before calling atol on it. We already make sure it is
> zero terminated. Otherwise atol might produce unexpected results.
As far as I
The ar_size field is a 10 character string, not zero terminated, of
decimal digits right padded with spaces. Make sure it actually starts
with a digit before calling atol on it. We already make sure it is
zero terminated. Otherwise atol might produce unexpected results.
Signed-off-by: Mark Wiela