diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2024-04-01 15:15:03 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2024-04-01 15:15:03 -0400 |
commit | 5eac8cef24543767015a9b248af08bbfa10b1b70 (patch) | |
tree | 189475852f387b9b31a48df66e0b1a0856c86d08 /src/fe_utils/string_utils.c | |
parent | 91cbb4b492cbea889e8392a85e246c1778ca2a45 (diff) | |
download | postgresql-5eac8cef24543767015a9b248af08bbfa10b1b70.tar.gz postgresql-5eac8cef24543767015a9b248af08bbfa10b1b70.zip |
Avoid possible longjmp-induced logic error in PLy_trigger_build_args.
The "pltargs" variable wasn't marked volatile, which makes it unsafe
to change its value within the PG_TRY block. It looks like the worst
outcome would be to fail to release a refcount on Py_None during an
(improbable) error exit, which would likely go unnoticed in the field.
Still, it's a bug. A one-liner fix could be to mark pltargs volatile,
but on the whole it seems cleaner to arrange things so that we don't
change its value within PG_TRY.
Per report from Xing Guo. This has been there for quite awhile,
so back-patch to all supported branches.
Discussion: https://postgr.es/m/CACpMh+DLrk=fDv07MNpBT4J413fDAm+gmMXgi8cjPONE+jvzuw@mail.gmail.com
Diffstat (limited to 'src/fe_utils/string_utils.c')
0 files changed, 0 insertions, 0 deletions