]> Savannah Git Hosting - gnulib.git/commit
xstrtol: be more robust against odd failures
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 Jul 2024 17:39:58 +0000 (10:39 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 Jul 2024 17:41:43 +0000 (10:41 -0700)
commit16b33e6649425fcdce095f262da98b539d2f7448
tree864ba047d01b29d1794c3db092c22d9dfcbfc296
parentf6c1e90dcf4e8ef437457522adc9e0dac6760903
xstrtol: be more robust against odd failures

* lib/xstrtol.c (__xstrtol): Don’t update *endptr if strtol doesn’t.
Also, if the underlying strtol gives an unusual error number and
sets *endpnr = nptr, assume that’s an error not a missing number.
Problems reported by Alejandro Colomar in:
https://lists.gnu.org/r/bug-gnulib/2024-07/msg00175.html
https://lists.gnu.org/r/bug-gnulib/2024-07/msg00176.html
* modules/xstrtol (Depends-on): Add nullptr.
ChangeLog
lib/xstrtol.c
modules/xstrtol