postgresql/src/backend/utils
Tom Lane 4c53519e15 Fix incorrect message-printing in win32security.c.
log_error() would probably fail completely if used, and would
certainly print garbage for anything that needed to be interpolated
into the message, because it was failing to use the correct printing
subroutine for a va_list argument.

This bug likely went undetected because the error cases this code
is used for are rarely exercised - they only occur when Windows
security API calls fail catastrophically (out of memory, security
subsystem corruption, etc).

The FRONTEND variant can be fixed just by calling vfprintf()
instead of fprintf().  However, there was no va_list variant
of write_stderr(), so create one by refactoring that function.
Following the usual naming convention for such things, call
it vwrite_stderr().

Author: Bryan Green <dbryan.green@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAF+pBj8goe4fRmZ0V3Cs6eyWzYLvK+HvFLYEYWG=TzaM+tWPnw@mail.gmail.com
Backpatch-through: 13
2025-10-13 17:56:45 -04:00
..
activity Fix incorrect option name in usage screen 2025-09-24 14:58:18 +02:00
adt Amend recent fix for SIMILAR TO regex conversion. 2025-09-13 16:55:51 -04:00
cache Ignore temporary relations in RelidByRelfilenumber() 2025-08-22 09:06:36 +09:00
error Fix incorrect message-printing in win32security.c. 2025-10-13 17:56:45 -04:00
fmgr Revise GUC names quoting in messages again 2024-05-17 11:44:26 +02:00
hash Fix invalid format string in HASH_DEBUG code 2025-08-15 18:06:35 +12:00
init Fix compilation warning with SerializeClientConnectionInfo() 2025-08-14 16:22:00 +09:00
mb With GB18030, prevent SIGSEGV from reading past end of allocation. 2025-05-05 04:52:07 -07:00
misc Allow resetting unknown custom GUCs with reserved prefixes. 2025-08-01 16:52:11 -05:00
mmgr Fix AlignedAllocRealloc to cope sanely with OOM. 2025-05-23 11:47:33 -04:00
resowner Remove unused typedefs 2024-05-17 07:36:12 +02:00
sort Use bump memory context for tuplesorts 2024-04-08 00:32:26 +12:00
time Update TransactionXmin when MyProc->xmin is updated 2024-12-21 23:42:52 +02:00
.gitignore Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
errcodes.txt Introduce transaction_timeout 2024-02-15 23:56:12 +02:00
Gen_dummy_probes.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
Gen_fmgrtab.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
generate-errcodes.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
Makefile Update copyright for 2024 2024-01-03 20:49:05 -05:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
postprocess_dtrace.sed Update copyright for 2024 2024-01-03 20:49:05 -05:00
probes.d Update copyright for 2024 2024-01-03 20:49:05 -05:00