From: David Carlier Date: Fri, 8 Apr 2016 09:37:02 +0000 (+0100) Subject: BUG/MEDIUM: sample: initialize the pointer before parse_binary call. X-Git-Tag: v1.7-dev3~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=64a16ab19cd7d5a5484b3fed3ae99e4ffb4caa71;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: sample: initialize the pointer before parse_binary call. 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] --- diff --git a/src/sample.c b/src/sample.c index 8a2fa4f3c6..4f89bab394 100644 --- a/src/sample.c +++ b/src/sample.c @@ -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))