From: Dragan Dosen Date: Thu, 16 Jun 2016 09:23:01 +0000 (+0200) Subject: BUG/MINOR: http: url32+src should check cli_conn before using it X-Git-Tag: v1.7-dev4~72 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db5af61f3cae7f937b56994c0b7c153f7ceeb366;p=thirdparty%2Fhaproxy.git BUG/MINOR: http: url32+src should check cli_conn before using it In function smp_fetch_url32_src(), it's better to check the value of cli_conn before we go any further. This patch needs to be backported to 1.6 and 1.5. --- diff --git a/src/proto_http.c b/src/proto_http.c index 77122817fc..228c90b52f 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -11654,6 +11654,9 @@ smp_fetch_url32_src(const struct arg *args, struct sample *smp, const char *kw, struct chunk *temp; struct connection *cli_conn = objt_conn(smp->sess->origin); + if (!cli_conn) + return 0; + if (!smp_fetch_url32(args, smp, kw, private)) return 0;