Commit 50bc0029 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Fix buffer overrun in varnishadm pass function

Spotted by: Coverity
parent 3c8d56a8
......@@ -351,7 +351,7 @@ pass(int sock)
}
}
if (fds[1].revents & POLLIN || fds[1].revents & POLLHUP) {
n = read(fds[1].fd, buf, sizeof buf);
n = read(fds[1].fd, buf, sizeof buf - 1);
if (n == 0) {
AZ(shutdown(sock, SHUT_WR));
fds[1].fd = -1;
......
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