]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] server redirection used an uninitialized string.
authorWilly Tarreau <w@1wt.eu>
Sat, 9 Jan 2010 20:29:23 +0000 (21:29 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 9 Jan 2010 20:29:23 +0000 (21:29 +0100)
This might have been introduced with chunk extensions. Note that
the server redirect still does not work because http_get_path()
cannot get the correct path once the request message is in the
HTTP_MSG_DONE state (->som does not point to the start of message
anymore).

src/proto_http.c

index 17beb0c5d057f2b94288632ca8fb27e61a628ef5..5b1ff9f9d3dae735fd607af5234835f0d3b9b296 100644 (file)
@@ -674,6 +674,7 @@ void perform_http_redirect(struct session *s, struct stream_interface *si)
        /* 1: create the response header */
        rdr.len = strlen(HTTP_302);
        rdr.str = trash;
+       rdr.size = sizeof(trash);
        memcpy(rdr.str, HTTP_302, rdr.len);
 
        /* 2: add the server's prefix */