strtou[l]l(3) silently converts negative numbers into positive. This behavior is wrong: a negative value should be parsed as a negative value, which would underflow unsigned (long) long, and so would return the smallest possible value, 0, and set errno to ERANGE to report an error. Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com> Cc: "Serge E. Hallyn" <serge@hallyn.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
1.7 KiB
1.7 KiB