From bbd49bb8008b87edf96ca762cea6865ade219379 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Tue, 19 Jun 2018 11:31:29 +0900 Subject: [PATCH] Fix oversight in pool_extract_error_message(). A variable used for storing the return value was mistakenly declared as bool, rather than int. This led to a segfault issue mentioned in 75b27e7 on certain platform. --- src/protocol/pool_process_query.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/protocol/pool_process_query.c b/src/protocol/pool_process_query.c index cfa4cd9e1..6baf46760 100644 --- a/src/protocol/pool_process_query.c +++ b/src/protocol/pool_process_query.c @@ -4330,19 +4330,19 @@ static bool pool_process_notice_message_from_one_backend(POOL_CONNECTION *fronte * kind will be read in this function. If "read_kind" is false, kind * should have been already read and it should be either 'E' or * 'N'. The returned string is in palloc'd buffer. Callers must pfree - * it if it becomes neccessary. + * it if it becomes unnecessary. * * If "unread" is true, the packet will be returned to the stream. * * Return values are: * 0: not error or notice message * 1: succeeded to extract error message - * -1: error) + * -1: error */ int pool_extract_error_message(bool read_kind, POOL_CONNECTION *backend, int major, bool unread, char **message) { char kind; - bool ret = 1; + int ret = 1; int readlen = 0, len; StringInfo str_buf; /* unread buffer */ StringInfo str_message_buf; /* message buffer */ -- 2.39.5