From: Tatsuo Ishii Date: Fri, 24 Jun 2016 06:56:01 +0000 (+0900) Subject: Fix buffer over run problem in "show pool_nodes". X-Git-Tag: V3_3_12~9 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=26636368c202b734c17385eb25522938d77323d0;p=pgpool2.git Fix buffer over run problem in "show pool_nodes". While processing "show pool_nodes", the buffer for hostname was too short. It should be same size as the buffer used for pgpool.conf. Problem reported by a twitter user who is using pgpool on AWS (which could have very long hostname). --- diff --git a/pcp/libpcp_ext.h b/pcp/libpcp_ext.h index b65ec4742..635d19aa5 100644 --- a/pcp/libpcp_ext.h +++ b/pcp/libpcp_ext.h @@ -186,7 +186,7 @@ typedef struct { /* nodes report struct */ typedef struct { char node_id[POOLCONFIG_MAXIDLEN+1]; - char hostname[POOLCONFIG_MAXIDENTLEN+1]; + char hostname[MAX_DB_HOST_NAMELEN+1]; char port[POOLCONFIG_MAXPORTLEN+1]; char status[POOLCONFIG_MAXSTATLEN+1]; char lb_weight[POOLCONFIG_MAXWEIGHTLEN+1];