postgresql/src
Tom Lane b081fe4199 Fix corner case bug in numeric to_char() some more.
The band-aid applied in commit f0bedf3e4 turns out to still need
some work: it made sure we didn't set Np->last_relevant too small
(to the left of the decimal point), but it didn't prevent setting
it too large (off the end of the partially-converted string).
This could result in fetching data beyond the end of the allocated
space, which with very bad luck could cause a SIGSEGV, though
I don't see any hazard of interesting memory disclosure.

Per bug #17839 from Thiago Nunes.  The bug's pretty ancient,
so back-patch to all supported versions.

Discussion: https://postgr.es/m/17839-aada50db24d7b0da@postgresql.org
2023-03-14 19:17:31 -04:00
..
backend Fix corner case bug in numeric to_char() some more. 2023-03-14 19:17:31 -04:00
bin Allow pg_dump to include/exclude child tables automatically. 2023-03-14 16:09:03 -04:00
common Fix JSON error reporting for many cases of erroneous string values. 2023-03-13 15:19:00 -04:00
fe_utils Revert refactoring of restore command code to shell_restore.c 2023-02-06 08:28:42 +09:00
include Add support for the error functions erf() and erfc(). 2023-03-14 09:17:36 +00:00
interfaces libpq: Add support for require_auth to control authorized auth methods 2023-03-14 14:00:05 +09:00
makefiles meson: Make auto the default of the ssl option 2023-03-13 07:04:11 +01:00
pl Break up long GETTEXT_FILES lists 2023-03-08 15:05:43 +01:00
port Remove gratuitous references to postmaster program 2023-01-26 10:48:32 +01:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test Fix corner case bug in numeric to_char() some more. 2023-03-14 19:17:31 -04:00
timezone Fix outdated references to guc.c 2023-03-02 13:49:39 +01:00
tools meson: Add target for installing test files & improve install_test_files 2023-03-08 11:12:10 -08:00
tutorial Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
.gitignore
DEVELOPERS
Makefile Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
Makefile.global.in autoconf: Move export_dynamic determination to configure 2022-12-06 18:55:28 -08:00
Makefile.shlib autoconf: Rely on ar supporting index creation 2022-10-07 11:53:39 -07:00
meson.build Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00