From: phk Date: Mon, 18 Sep 2006 14:54:20 +0000 (+0000) Subject: Off by one. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=425755a9ec7d5f4716abd326f0ae4fbfe83370de;p=varnish Off by one. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1075 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/shmlog.c b/varnish-cache/bin/varnishd/shmlog.c index 1e6cce65..38fbdb21 100644 --- a/varnish-cache/bin/varnishd/shmlog.c +++ b/varnish-cache/bin/varnishd/shmlog.c @@ -79,7 +79,7 @@ VSLR(enum shmlogtag tag, unsigned id, const char *b, const char *e) assert(loghead->ptr < loghead->size); /* Wrap if necessary */ - if (loghead->ptr + 5 + l + 1 > loghead->size) + if (loghead->ptr + 5 + l + 1 >= loghead->size) vsl_wrap(); p = logstart + loghead->ptr; loghead->ptr += 5 + l;