mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
valgrind caught an off-by-one allocation bug
This commit is contained in:
parent
04997d4272
commit
9566d6c414
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user