postgresql/src
Tom Lane f1c1bafcdf 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:25:01 -05:00
..
backend Clear errno before calling strtol() in spell.c. 2025-03-08 11:25:01 -05:00
bin Fix pg_dumpall to cope with dangling OIDs in pg_auth_members. 2025-02-21 13:37:12 -05:00
common Add pg_encoding_set_invalid() 2025-02-10 10:03:40 -05:00
fe_utils In fmtIdEnc(), handle failure of enlargePQExpBuffer(). 2025-02-16 12:46:35 -05:00
include Fix broken handling of domains in atthasmissing logic. 2025-03-03 12:43:29 -05:00
interfaces Translation updates 2025-02-17 17:51:30 +01:00
makefiles Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
pl Translation updates 2025-02-17 17:51:30 +01:00
port Fix pg_strtof() to not crash on NULL endptr. 2025-03-01 14:22:56 -05:00
template On NetBSD, force dynamic symbol resolution at postmaster start. 2022-08-30 17:29:08 -04:00
test Fix ALTER TABLE error message 2025-03-04 20:07:30 +01:00
timezone Update time zone data files to tzdata release 2025a. 2025-01-20 16:49:15 -05:00
tools valgrind: Adjust suppressions to handle glibc changes 2025-03-06 08:46:42 -05:00
tutorial Doc: sync src/tutorial/basics.source with SGML documentation. 2022-11-19 13:09:14 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Suppress macOS warnings about duplicate libraries in link commands. 2023-09-29 14:07:30 -04:00
Makefile.shlib Stop using "-multiply_defined suppress" on macOS. 2023-09-26 21:06:21 -04:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00