summaryrefslogtreecommitdiffstats
path: root/src/openvpn/options.c
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2015-10-14 15:05:56 +0200
committerDavid Sommerseth <davids@redhat.com>2015-10-15 16:57:07 +0200
commitf417db630353648a0bd1cd9d634413ce446fe900 (patch)
treeab60672207d6deadf553fe20847b98a1b1ce6b31 /src/openvpn/options.c
parenta3160fc1bd7368395745b9cee6e40fb819f5564c (diff)
downloadopenvpn-f417db630353648a0bd1cd9d634413ce446fe900.tar.gz
openvpn-f417db630353648a0bd1cd9d634413ce446fe900.tar.xz
openvpn-f417db630353648a0bd1cd9d634413ce446fe900.zip
Fix commit a3160fc1bd7368395745b9cee6e40fb819f5564crelease/2.3
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> (cherry picked from commit cba33989101175ac07434b9c5cceba116bf38127)
Diffstat (limited to 'src/openvpn/options.c')
-rw-r--r--src/openvpn/options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index fc420bf..5b6af82 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -3756,13 +3756,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)))