Commit cd4bb90e 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 daf0e2c1
......@@ -586,6 +586,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