pg_resetwal: Improve numeric command-line argument parsing
Check errno after strtoul()/strtol() to handle out of range errors
better. For out of range, strtoul() returns ULONG_MAX, and the
previous code would proceed with that result.
Reported-by: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/6a10a211-872b-3c4c-106b-909ae5fefa61%40enterprisedb.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9a6345ed741783e8770ef160e822d2257873adef
Modified Files
--------------
src/bin/pg_resetwal/pg_resetwal.c | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)