summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBo Peng2024-06-28 10:42:58 +0000
committerBo Peng2024-06-28 10:42:58 +0000
commitc1b17275fc0db9991fb6c644d098bf10ca00cc66 (patch)
tree240d40637489872b2d628b4fa20136f41b8a3bc7 /src
parent98fff9832f602ea5571427982f1050348f9f0219 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/config/pool_config.l4
1 files changed, 3 insertions, 1 deletions
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)