Commit 4f58e8a7 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Ignore fd's larger than 65536 in varnishncsa

This makes varnishncsa behave the same way as varnishlog, and prevents
overly large memory allocations if it should see a bogus fd (shmlog
overrun?).

XXX: This will not fix varnishncsa for current trunk, as that is using
XIDs instead of FDs breaking some functionality in the tools. This
will be handled in the API rewrite.
parent 41c153b5
......@@ -584,6 +584,10 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
const char *p;
struct vsb *os;
/* XXX: Ignore fd's outside 65536 */
if (fd >= 65536)
return (reopen);
if (fd >= nll) {
struct logline **newll = ll;
size_t newnll = nll;
......
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