diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2013-10-18 14:43:22 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2013-10-18 14:43:22 +0000 |
commit | e0d32b61de2148fb98df38d72d772b1b793dcc94 (patch) | |
tree | b89b1467121309589778683096e8d316fd688576 | |
parent | 91e9f359887862e9303466bf94bac8e367f40ad5 (diff) |
Calculate correct pointer for end_request; while there initialize
reserved to zero.
OK blambert
-rw-r--r-- | usr.sbin/slowcgi/slowcgi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/slowcgi/slowcgi.c b/usr.sbin/slowcgi/slowcgi.c index fa36cf31195..a5128d484bd 100644 --- a/usr.sbin/slowcgi/slowcgi.c +++ b/usr.sbin/slowcgi/slowcgi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slowcgi.c,v 1.12 2013/10/18 14:42:18 florian Exp $ */ +/* $OpenBSD: slowcgi.c,v 1.13 2013/10/18 14:43:21 florian Exp $ */ /* * Copyright (c) 2013 David Gwynne <dlg@openbsd.org> * Copyright (c) 2013 Florian Obser <florian@openbsd.org> @@ -840,10 +840,13 @@ create_end_record(struct request *c) fcgi_end_request_body)); header->padding_len = 0; header->reserved = 0; - end_request = (struct fcgi_end_request_body *) resp->data + - sizeof(struct fcgi_record_header); + end_request = (struct fcgi_end_request_body *) (resp->data + + sizeof(struct fcgi_record_header)); end_request->app_status = htonl(c->script_status); end_request->protocol_status = FCGI_REQUEST_COMPLETE; + end_request->reserved[0] = 0; + end_request->reserved[1] = 0; + end_request->reserved[2] = 0; resp->data_pos = 0; resp->data_len = sizeof(struct fcgi_end_request_body) + sizeof(struct fcgi_record_header); |