postgresql/src/fe_utils
Tom Lane 644b7d686e In fmtIdEnc(), handle failure of enlargePQExpBuffer().
Coverity complained that we weren't doing that, and it's right.

This fix just makes fmtIdEnc() honor the general convention that OOM
causes a PQExpBuffer to become marked "broken", without any immediate
error.  In the pretty-unlikely case that we actually did hit OOM here,
the end result would be to return an empty string to the caller,
probably resulting in invalid SQL syntax in an issued command (if
nothing else went wrong, which is even more unlikely).  It's tempting
to throw an "out of memory" error if the buffer becomes broken, but
there's not a lot of point in doing that only here and not in hundreds
of other PQExpBuffer-using places in pg_dump and similar callers.
The whole issue could do with some non-time-crunched redesign, perhaps.

This is a followup to the fixes for CVE-2025-1094, and should be
included if cherry-picking those fixes.
2025-02-16 12:46:35 -05:00
..
.gitignore Move psql's psqlscan.l into src/fe_utils. 2016-03-24 20:28:47 -04:00
archive.c Revert refactoring of restore command code to shell_restore.c 2023-02-06 08:28:42 +09:00
cancel.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
conditional.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
connect_utils.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
Makefile Update copyright for 2023 2023-01-02 15:00:37 -05:00
mbprint.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
option_utils.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
parallel_slot.c Don't spuriously report FD_SETSIZE exhaustion on Windows. 2023-10-14 15:54:49 -07:00
print.c Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
psqlscan.l Prevent mis-encoding of "trailing junk after numeric literal" errors. 2024-09-05 12:42:33 -04:00
query_utils.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
recovery_gen.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
simple_list.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
string_utils.c In fmtIdEnc(), handle failure of enlargePQExpBuffer(). 2025-02-16 12:46:35 -05:00