]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: contrib/mod_defender: update pointer on the end of the frame
authorDragan Dosen <ddosen@haproxy.com>
Fri, 1 Jun 2018 13:42:12 +0000 (15:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 4 Jun 2018 15:41:25 +0000 (17:41 +0200)
Similar to commit 94bb4c6 ("BUG/MINOR: spoa: Update pointer on the end of
the frame when a reply is encoded").

This patch should be backported to 1.8.

contrib/mod_defender/spoa.c

index d2b333ce4cc5bc3c5f8baa54f37f543132b0591e..94e6d6bda08e6bdf8fcb7bb0096fcb79f5eb7a5d 100644 (file)
@@ -1345,7 +1345,8 @@ process_frame_cb(evutil_socket_t fd, short events, void *arg)
        frame->flags  = 0;
 
        ret = prepare_agentack(frame);
-       p = frame->buf + ret;
+       p   = frame->buf + ret;
+       end = frame->buf+max_frame_size;
 
        if (frame->defender_status != -1) {
                DEBUG(frame->worker, "Add action : set variable status=%u",