[pgpool-committers: 9910] pgpool: Fix psql_scan crash.

Tatsuo Ishii ishii at sraoss.co.jp
Tue Jun 4 10:49:35 JST 2024


Fix psql_scan crash.

It was reported that psql_scan crashes while determining whether a
string in a long query is psql variable (i.e. starting with ":") or
not.

https://github.com/pgpool/pgpool2/issues/54

This is because callback struct were not provided while calling
psql_scan_create().  Later psql_scan() tries to invoke a callback and
crashes because the pointer to the callback struct is NULL. To fix
this, provide PsqlScanCallbacks struct with a NULL pointer inside to
the callback function. With this, psql_scan() avoids to invoke a
callback.

Backpatch to master, V4.5, V4.4, V4.3, V4.2 and V4.1 where psql_scan
was introduced.

Branch
------
V4_3_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=63d791bd4c2cc6e4fa3a1f2c54c76d798d7b5e92

Modified Files
--------------
src/protocol/pool_proto_modules.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)



More information about the pgpool-committers mailing list