From: scantor Date: Mon, 8 Oct 2012 18:31:14 +0000 (+0000) Subject: https://issues.shibboleth.net/jira/browse/SSPCPP-514 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=92e0b257dbc1b7457ace26b0573df3dfd8fdf7a6;p=shibboleth%2Fsp.git https://issues.shibboleth.net/jira/browse/SSPCPP-514 git-svn-id: https://svn.shibboleth.net/cpp-sp/branches/REL_2@3776 cb58f699-b61c-0410-a6fe-9272a202ed29 --- 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