]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: sample: initialize the pointer before parse_binary call.
authorDavid Carlier <dcarlier@afilias.info>
Fri, 8 Apr 2016 09:37:02 +0000 (10:37 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 12 Apr 2016 09:08:24 +0000 (11:08 +0200)
parse_binary line 2025 checks the nullity of binstr parameter.
Other calls of parse_binary properly zeroify this parameter.
[wt: this could result in random failures of the const parser]

src/sample.c

index 8a2fa4f3c6db0671c27fd89d31da863a90f2b5b0..4f89bab394268b5f0fbea701a61f3b31a022fd0c 100644 (file)
@@ -2524,7 +2524,7 @@ static int smp_fetch_const_ipv6(const struct arg *args, struct sample *smp, cons
 
 static int smp_check_const_bin(struct arg *args, char **err)
 {
-       char *binstr;
+       char *binstr = NULL;
        int binstrlen;
 
        if (!parse_binary(args[0].data.str.str, &binstr, &binstrlen, err))