postgresql/src/fe_utils
Tom Lane 9f052613e4 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 Message fixes and style improvements 2020-09-14 06:42:07 +02:00
cancel.c Avoid calling gettext() in signal handlers. 2022-01-17 13:30:04 -05:00
conditional.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
Makefile Move frontend-side archive APIs from src/common/ to src/fe_utils/ 2020-06-11 15:48:56 +09:00
mbprint.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
print.c Clean up assorted failures under clang's -fsanitize=undefined checks. 2022-03-03 18:13:24 -05:00
psqlscan.l Reduce size of backend scanner's tables. 2020-01-13 15:04:31 -05:00
recovery_gen.c Fix bug in pg_basebackup -F plain -R. 2020-02-12 09:08:22 +09:00
simple_list.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
string_utils.c In fmtIdEnc(), handle failure of enlargePQExpBuffer(). 2025-02-16 12:46:35 -05:00