From: Willy Tarreau Date: Tue, 22 Apr 2014 21:32:05 +0000 (+0200) Subject: BUG/MAJOR: http: fix bug in parse_qvalue() when selecting compression algo X-Git-Tag: v1.5-dev23~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=38b3aa56462568e89d5086bf941f09fcb5cfd755;p=thirdparty%2Fhaproxy.git BUG/MAJOR: http: fix bug in parse_qvalue() when selecting compression algo Commit ad90351 ("MINOR: http: Add the "language" converter to for use with accept-language") introduced a typo in parse_qvalue : if (*end) *end = qvalue; while it should be : if (end) *end = qvalue; Since end is tested for being NULL. This crashes when selecting the compression algorithm since end is NULL here. No backport is needed, this is just in latest 1.5-dev. --- diff --git a/src/proto_http.c b/src/proto_http.c index a22e2500ae..1e038f4613 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -2151,7 +2151,7 @@ int parse_qvalue(const char *qvalue, const char **end) out: if (q > 1000) q = 1000; - if (*end) + if (end) *end = qvalue; return q; }