postgresql/src/backend/tsearch
Tom Lane 7fb8801021 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
2025-03-08 11:24:25 -05:00
..
dicts Update copyright for 2019 2019-01-02 12:44:25 -05:00
dict.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
dict_ispell.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
dict_simple.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
dict_synonym.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
dict_thesaurus.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
Makefile Update copyright for 2025 2025-01-01 11:21:55 -05:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
regis.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
spell.c Clear errno before calling strtol() in spell.c. 2025-03-08 11:24:25 -05:00
to_tsany.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
ts_locale.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
ts_parse.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
ts_selfuncs.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
ts_typanalyze.c Add is_analyze parameter to vacuum_delay_point(). 2025-02-11 16:38:14 -06:00
ts_utils.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
wparser.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
wparser_def.c Reword recent error messages: "should" -> "must" 2025-01-21 15:24:49 +01:00