]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] check_post: limit analysis to the buffer length
authorWilly Tarreau <w@1wt.eu>
Sun, 6 Dec 2009 17:16:59 +0000 (18:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 22 Dec 2009 08:52:42 +0000 (09:52 +0100)
If "balance url_param XXX check_post" is used, we must bound the
number of bytes analysed to the buffer's length.

src/backend.c

index f4e6110f977c858b3a57ac77399aa9b7780b1d5f..70201ce2c95710ab2f5e720dfd57a69c455639a4 100644 (file)
@@ -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) {