Re: [Openvpn-devel] [PATCH V2] Fix commit c67acea173dc9ee37220f5b9ff14ede081181992
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. On 14.10.2015 16:05, Arne Schwabe wrote: 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(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 086dcea..c2b956d 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -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)))
[Openvpn-devel] [PATCH V2] 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(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 086dcea..c2b956d 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -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.3.8 (Apple Git-58)
[Openvpn-devel] [PATCH] Fix commit c67acea173dc9ee37220f5b9ff14ede081181992
--- src/openvpn/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 086dcea..c2b956d 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -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.3.8 (Apple Git-58)