Browse code

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>

Arne Schwabe authored on 2015/10/14 22:05:56
Showing 1 changed files
... ...
@@ -3691,13 +3691,13 @@ static char *
3691 3691
 read_inline_file (struct in_src *is, const char *close_tag, struct gc_arena *gc)
3692 3692
 {
3693 3693
   char line[OPTION_LINE_SIZE];
3694
-  char *line_ptr = line;
3695 3694
   struct buffer buf = alloc_buf (8*OPTION_LINE_SIZE);
3696 3695
   char *ret;
3697 3696
   bool endtagfound = false;
3698 3697
 
3699 3698
   while (in_src_get (is, line, sizeof (line)))
3700 3699
     {
3700
+      char *line_ptr = line;
3701 3701
       /* Remove leading spaces */
3702 3702
       while (isspace(*line_ptr)) line_ptr++;
3703 3703
       if (!strncmp (line_ptr, close_tag, strlen (close_tag)))