From 0608c7cda0bf4e8818828a295910feedfd6b10bc Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Mon, 8 Oct 2012 18:31:14 +0000 Subject: [PATCH] https://issues.shibboleth.net/jira/browse/SSPCPP-514 --- fastcgi/shibresponder.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastcgi/shibresponder.cpp b/fastcgi/shibresponder.cpp index 5783f4b..e23bf58 100644 --- a/fastcgi/shibresponder.cpp +++ b/fastcgi/shibresponder.cpp @@ -248,10 +248,11 @@ static long gstdin(FCGX_Request* request, char** content) if (clen > STDIN_MAX) clen = STDIN_MAX; - *content = new char[clen]; + *content = new char[clen + 1]; cin.read(*content, clen); clen = cin.gcount(); + (*content)[clen] = 0; } else { // *never* read stdin when CONTENT_LENGTH is missing or unparsable -- 2.1.4