From: Willy Tarreau Date: Sun, 6 Dec 2009 17:16:59 +0000 (+0100) Subject: [BUG] check_post: limit analysis to the buffer length X-Git-Tag: v1.4-dev5~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc8017ced6a8ec699a50a409f3c8ce5928ea70fa;p=thirdparty%2Fhaproxy.git [BUG] check_post: limit analysis to the buffer length If "balance url_param XXX check_post" is used, we must bound the number of bytes analysed to the buffer's length. --- diff --git a/src/backend.c b/src/backend.c index f4e6110f97..70201ce2c9 100644 --- a/src/backend.c +++ b/src/backend.c @@ -289,6 +289,9 @@ struct server *get_server_ph_post(struct session *s) len = chunk; } + if (len > req->l - body) + len = req->l - body; + p = params; while (len > plen) {