valgrind caught an off-by-one allocation bug

This commit is contained in:
erik%vanderpoel.org 2005-01-21 18:09:53 +00:00
parent 04997d4272
commit 9566d6c414

View File

@ -354,7 +354,7 @@ httpGetObject(HTTP *http, App *app, int sock, URL *url, unsigned char **headers)
len += countOrCopy(&p, "\n");
if (!buf)
{
buf = malloc(len);
buf = malloc(len + 1);
if (!buf)
{
return;