diff options
author | Arne Schwabe <arne@rfc2549.org> | 2015-10-14 15:05:56 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2015-10-15 16:50:04 +0200 |
commit | cba33989101175ac07434b9c5cceba116bf38127 (patch) | |
tree | c4511d0db5d04dddfd69051f6a4b5e2816801ee6 | |
parent | 8929a395c7e9ad41872d9d25b654a14e1bb37e9c (diff) | |
download | openvpn-cba33989101175ac07434b9c5cceba116bf38127.tar.gz openvpn-cba33989101175ac07434b9c5cceba116bf38127.tar.xz openvpn-cba33989101175ac07434b9c5cceba116bf38127.zip |
Fix commit c67acea173dc9ee37220f5b9ff14ede081181992
Move things to the proper place, ensure that line_ptr is actually properly
initialized for *every* line read, not just for the first one
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: 1444827956-2169-1-git-send-email-arne@rfc2549.org
URL: http://article.gmane.org/gmane.network.openvpn.devel/10271
Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r-- | src/openvpn/options.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvpn/options.c b/src/openvpn/options.c index cfba728..5654830 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3691,13 +3691,13 @@ static char * read_inline_file (struct in_src *is, const char *close_tag, struct gc_arena *gc) { char line[OPTION_LINE_SIZE]; - char *line_ptr = line; struct buffer buf = alloc_buf (8*OPTION_LINE_SIZE); char *ret; bool endtagfound = false; while (in_src_get (is, line, sizeof (line))) { + char *line_ptr = line; /* Remove leading spaces */ while (isspace(*line_ptr)) line_ptr++; if (!strncmp (line_ptr, close_tag, strlen (close_tag))) |