]> Savannah Git Hosting - gnulib.git/commit
parse-duration: Work around an strtoul() misfeature.
authorBruno Haible <bruno@clisp.org>
Fri, 21 Mar 2025 12:15:55 +0000 (13:15 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 21 Mar 2025 12:15:55 +0000 (13:15 +0100)
commit3df6da258c338e4fd165a2850bb8d4b0f39b6e9b
tree83b23e7ad5c20fbe6a3416d53b5414860ab15d80
parent195dcaf45ccce941f0345b1d4c51d66ee15b9144
parse-duration: Work around an strtoul() misfeature.

* lib/parse-duration.c (str_const_to_ul): Reject a + or - sign between
the optional whitespace and the digits.
* tests/test-parse-duration.sh: Add some tests with expected failure.
* tests/test-parse-duration.c (main): Fix usage message.
ChangeLog
lib/parse-duration.c
tests/test-parse-duration.c
tests/test-parse-duration.sh