postgresql/src/backend
Tom Lane 6d3a9a60f7 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
..
access Log the correct ending timestamp in recovery_target_xid mode. 2023-01-19 12:23:20 -05:00
bootstrap Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:13 -07:00
catalog Allow REPLICA IDENTITY to be set on an index that's not (yet) valid. 2023-01-21 13:10:30 -05:00
commands Ensure COPY TO on an RLS-enabled table copies no more than it should. 2023-03-10 13:52:28 -05:00
executor Fix some more cases of missed GENERATED-column updates. 2023-03-06 18:31:16 -05:00
foreign Update copyright for 2019 2019-01-02 12:44:25 -05:00
jit Fix typos in comments, code and documentation 2023-01-03 16:26:37 +09:00
lib Fix lock assertions in dshash.c. 2022-07-11 15:51:47 +12:00
libpq Fix handling of SCRAM-SHA-256's channel binding with RSA-PSS certificates 2023-02-15 10:12:38 +09:00
main Fix outdated --help message for postgres -f 2022-08-15 13:37:42 +09:00
nodes Further fixes for MULTIEXPR_SUBLINK fix. 2022-09-06 16:38:18 -04:00
optimizer Fix MULTIEXPR_SUBLINK with partitioned target tables, yet again. 2023-02-25 14:44:14 -05:00
parser Fix failure to detect some cases of improperly-nested aggregates. 2023-03-13 12:40:28 -04:00
partitioning Avoid using ambiguous word "non-negative" in error messages. 2021-07-28 01:24:24 +09:00
po Translation updates 2023-02-06 12:21:32 +01:00
port Reject huge_pages=on if shared_memory_type=sysv. 2021-10-26 13:01:52 +13:00
postmaster Reject CancelRequestPacket having unexpected length. 2023-01-21 06:08:04 -08:00
regex Defend against stack overrun in a few more places. 2022-08-24 13:01:40 -04:00
replication Don't repeatedly register cache callbacks in pgoutput plugin. 2023-02-23 15:40:28 -05:00
rewrite Fix more bugs caused by adding columns to the end of a view. 2023-03-07 18:21:37 -05:00
snowball In the Snowball dictionary, don't try to stem excessively-long words. 2022-08-31 10:42:05 -04:00
statistics Build inherited extended stats on partitioned tables 2022-01-15 19:02:58 +01:00
storage Fix race in SERIALIZABLE READ ONLY. 2023-03-09 17:25:20 +13:00
tcop Rethink handling of [Prevent|Is]InTransactionBlock in pipeline mode. 2022-12-13 14:23:59 -05:00
tsearch Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline. 2022-11-21 17:07:07 -05:00
utils Fix corner case bug in numeric to_char() some more. 2023-03-14 19:17:31 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Get rid of jsonpath_gram.h and jsonpath_scanner.h 2019-03-20 11:13:34 +03:00
nls.mk Translation updates 2020-08-10 15:21:18 +02:00