summaryrefslogtreecommitdiff
path: root/src/common/psprintf.c
diff options
context:
space:
mode:
authorTom Lane2025-03-08 16:24:22 +0000
committerTom Lane2025-03-08 16:24:42 +0000
commit99c01aadf979eed412a5189c8370ec8fe4784e6f (patch)
treeb2e1e9cd1f1ec12cfd579e37c26b28b09ef7fa11 /src/common/psprintf.c
parentc3510cfc8b401d61812713c4ccf040125dc7ce1b (diff)
Clear errno before calling strtol() in spell.c.
Per POSIX, a caller of strtol() that wishes to check for errors must set errno to 0 beforehand. Several places in spell.c neglected that, so that they risked delivering a false overflow error in case errno had been ERANGE already. Given the lack of field reports, this case may be unreachable at present --- but it's surely trouble waiting to happen, so fix it. Author: Jacob Brazeal <jacob.brazeal@gmail.com> Discussion: https://postgr.es/m/CA+COZaBhsq6EromFm+knMJfzK6nTpG23zJ+K2=nfUQQXcj_xcQ@mail.gmail.com Backpatch-through: 13
Diffstat (limited to 'src/common/psprintf.c')
0 files changed, 0 insertions, 0 deletions