Commit 6a0eec8e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make room for protective terminating NUL


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@300 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 8c3aee3b
......@@ -305,11 +305,13 @@ http_read_f(int fd, short event, void *arg)
{
struct http *hp = arg;
char *p;
unsigned l;
int i;
assert(hp->v < hp->e);
l = hp->e - hp->v;
assert(l > 1);
errno = 0;
i = read(fd, hp->v, hp->e - hp->v);
i = read(fd, hp->v, l - 1);
if (i <= 0) {
if (hp->v != hp->s)
VSL(SLT_HttpError, fd,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment