pgsql: pg_resetwal: Improve numeric command-line argument parsing
Started by Peter Eisentrautalmost 5 years ago1 messagescomitters
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.dilger@enterprisedb.com>
Discussion: /messages/by-id/6a10a211-872b-3c4c-106b-909ae5fefa61@enterprisedb.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(-)