Commit e9aa5e4c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make sure new seg is inside silo.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4198 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent beaa6999
...@@ -892,6 +892,7 @@ smp_new_seg(struct smp_sc *sc) ...@@ -892,6 +892,7 @@ smp_new_seg(struct smp_sc *sc)
} else { } else {
sg->offset = sg2->offset + sg2->length; sg->offset = sg2->offset + sg2->length;
assert(sg->offset < sc->mediasize); assert(sg->offset < sc->mediasize);
assert(sg->offset + sg2->length < sc->mediasize);
} }
sg->length = sc->aim_segl; sg->length = sc->aim_segl;
sg->length &= ~7; sg->length &= ~7;
......
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