[pgpool-committers: 4786] pgpool: Fix segfault in per_node_error_log() on armhf architecture.

Tatsuo Ishii ishii at postgresql.org
Tue Jun 19 10:31:52 JST 2018


Fix segfault in per_node_error_log() on armhf architecture.

pool_extract_error_message() incorrectly returns 255 (in decimal) on
the architecture when previous message was not an error or a notice
message. In this case per_node_error_log() happily calls ereport since
the return value from pool_extract_error_message() is greater than
0. Unfortunately the message string returned by
pool_extract_error_message() points to garbage memory in this case, a
segfault occurs.

The fix gives per_node_error_log() a guard against the bug of
pool_extract_error_message(). Moreover, the change is more consistent
with other places where pool_extract_error_message() is called.

Fix for pool_extract_error_message() will come later on.

See:
https://github.com/pgpool/pgpool2/issues/14
for more detailed discussion.

Problem reported and patch by Christian Ehrhardt.

Branch
------
V3_4_STABLE

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

Modified Files
--------------
src/protocol/pool_proto_modules.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



More information about the pgpool-committers mailing list