From: Bo Peng Date: Fri, 28 Jun 2024 10:42:58 +0000 (+0900) Subject: Fixed segmentation fault at parsing config file. X-Git-Tag: V4_6_0_BETA1~80 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=c1b17275fc0db9991fb6c644d098bf10ca00cc66;p=pgpool2.git Fixed segmentation fault at parsing config file. This commit fixed a segmentation fault that occurs when parsing pgpool.conf if the setting value was not enclosed in single quotes. The patch is created by Carlos Chapi, reviewed and modified by Tatsuo Ishii. --- diff --git a/src/config/pool_config.l b/src/config/pool_config.l index 2eef2ed11..b681e8a38 100644 --- a/src/config/pool_config.l +++ b/src/config/pool_config.l @@ -335,7 +335,7 @@ ParseConfigFile(const char *config_file, const char *calling_file, FILE *fd; YY_BUFFER_STATE lex_buffer; int token; - char *key = NULL; + char *key; char *val; ConfigVariable *item; char buf[POOLMAXPATHLEN + 1]; @@ -394,6 +394,8 @@ ParseConfigFile(const char *config_file, const char *calling_file, for(;;) { + key = NULL; + token = yylex(); if (token == 0)