Fixed a strcpy into a short malloc buffer in GSWAdaptors/common/GSWHTTPResponse.c

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@6451 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Karl Kraft 2000-04-11 17:13:15 +00:00
parent 4804f49132
commit 0473f83275
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,6 @@
2000-04-11 Karl Kraft <karl@nfox.com>
* Fixed a strcpy into a short malloc buffer in GSWAdaptors/common/GSWHTTPResponse.c
2000-04-06 Karl Kraft <karl@nfox.com>
* Added two checks for non-nil key before calling removeObjectForKey:

View file

@ -123,11 +123,14 @@ GSWHTTPResponse* GSWHTTPResponse_BuildErrorResponse(GSWAppRequest* p_pAppRequest
GSWString_Append(pBuffer,GSWTemplate_ErrorResponseText(TRUE));
GSWString_SearchReplace(pBuffer,"##TEXT##",pBufferMessage->pszData);
GSWTemplate_ReplaceStd(pBuffer,pApp);
pHTTPResponse->uContentLength = GSWString_Len(pBuffer);
pHTTPResponse->pContent = malloc(pHTTPResponse->uContentLength);
strcpy(pHTTPResponse->pContent,pBuffer->pszData);
pHTTPResponse->pContent = pBuffer->pszData;
GSWString_Detach(pBuffer);
GSWString_Free(pBuffer);
pBuffer=NULL;
GSWString_Free(pBufferMessage);
pBufferMessage=NULL;
sprintf(szBuffer,"%d",pHTTPResponse->uContentLength);