Skip to contentSkip to conversation

Fix commit c67acea173dc9ee37220f5b9ff14ede081181992

PATCH In review Arne Schwabe 3 participants 7 messages Oct 14, 2015 – Oct 15, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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

---
 src/openvpn/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/options.c +1 -1
index 086dcea..c2b956d 100644
@@ -3672,13 +3672,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)))
Signature · 1 line
2.3.8 (Apple Git-58)
#1 lore raw

ACK from me. Tested on ics-openvpn, problem with endtag now fixed.

A nitpick. git am says:

/home/stiple/Projects/ics-openvpn/.git/modules/main/openvpn/rebase-apply/patch:20: trailing whitespace.

      char *line_ptr = line;

warning: 1 line adds whitespace errors.

Quoted 27 lines · Arne Schwabe

Move things to the proper place, ensure that line_ptr is actually properly initialized for *every* line read, not just for the first one

---
  src/openvpn/options.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/options.c +1 -1
index 086dcea..c2b956d 100644
@@ -3672,13 +3672,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)))
#2 lore raw
Quoted 9 lines · Lev Stipakov

ACK from me. Tested on ics-openvpn, problem with endtag now fixed.

A nitpick. git am says:

/home/stiple/Projects/ics-openvpn/.git/modules/main/openvpn/rebase-apply/patch:20:

trailing whitespace.

      char *line_ptr = line;

warning: 1 line adds whitespace errors.

Nice catch! However, I believe git am --whitespace=fix fixes those; which our git ack-am script uses.

kind regards,

David Sommerseth

#4 lore raw
Quoted 2 lines · David Sommerseth

From: David Sommerseth <[email protected]...>

Please disregard, this went out by a mistake.

Signature · 3 lines
kind regards,

David Sommerseth
#5 lore raw
In reply to Arne Schwabe

From: David Sommerseth <[email protected]...>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Your patch has been applied to the master branch.

commit cba33989101175ac07434b9c5cceba116bf38127

Author: Arne Schwabe
Date:   Wed Oct 14 15:05:56 2015 +0200
     Fix commit c67acea173dc9ee37220f5b9ff14ede081181992

     Acked-by: Lev Stipakov <[email protected]...>
     Message-Id: [email protected]...
     URL: http://article.gmane.org/gmane.network.openvpn.devel/10271
     Signed-off-by: David Sommerseth <[email protected]...>

- --
kind regards,

David Sommerseth

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlYfvTsACgkQDC186MBRfrpY3gCffS0SPSnNevLssNasbI0bX00S X5IAoJkFGC+Yvk3IBSKTpn4+ilQ6MB0X
=yV5l
-----END PGP SIGNATURE-----

#6 lore raw

Forgot release/2.3 ... it's added there too as
commit f417db630353648a0bd1cd9d634413ce446fe900

I changed the subject line in the release/2.3 commit to match the proper cherry picked commit in that branch.

Quoted 15 lines · David Sommerseth

From: David Sommerseth <[email protected]...>

Your patch has been applied to the master branch.

commit cba33989101175ac07434b9c5cceba116bf38127

Author: Arne Schwabe
Date:   Wed Oct 14 15:05:56 2015 +0200
     Fix commit c67acea173dc9ee37220f5b9ff14ede081181992

     Acked-by: Lev Stipakov <[email protected]...>
     Message-Id: [email protected]...
     URL: http://article.gmane.org/gmane.network.openvpn.devel/10271
     Signed-off-by: David Sommerseth <[email protected]...>
Signature · 3 lines
kind regards,

David Sommerseth