Hello,

the attached patch against musl-0.8.3 
removes an undefined behavior when atoi()
is applied to the representation of INT_MIN.

The undefined behavior is not observable
if the compiler implements 2's complement
for signed arithmetic overflows, but the compiler
doesn't have to.

On the other hand, C99 mandates either two's complement's
lopsided representation of integers or other,
symmetrical, representations (6.2.6.2), so I think the patch
is an overall improvement.

The patch applies in musl-0.8.3/src/stdlib/
and contains identical changes for atol() and atoll().

Regards,

Pascal