From 9b2cf1c66be12bbb235f77c9483f8b9840a4204a Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Tue, 18 Sep 2007 20:35:28 +0000 Subject: [PATCH] fixed to bugs in optionsfrom.c --- src/libstrongswan/utils/optionsfrom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libstrongswan/utils/optionsfrom.c b/src/libstrongswan/utils/optionsfrom.c index a0bbd9567..093451f88 100644 --- a/src/libstrongswan/utils/optionsfrom.c +++ b/src/libstrongswan/utils/optionsfrom.c @@ -70,6 +70,9 @@ static err_t parse_options_file(const char *filename, int *argcp, char **argvp[] next = optind; newargv[next] = NULL; + /* we keep the chunk pointer so that we can still free it */ + src = chunk; + while (fetchline(&src, &line) && ugh == NULL) { while (eat_whitespace(&line)) @@ -92,6 +95,7 @@ static err_t parse_options_file(const char *filename, int *argcp, char **argvp[] { /* last token in a line */ token = line; + line.len = 0; } }