[master] b8034f3 Use weaker plain magic check for WS overflows to avoid recursive panics
Poul-Henning Kamp
phk at FreeBSD.org
Mon Dec 9 14:56:48 CET 2013
commit b8034f3196c40f2f8efb837fc8ffd86d3f6388fa
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Dec 9 13:56:17 2013 +0000
Use weaker plain magic check for WS overflows to avoid recursive panics
diff --git a/bin/varnishd/cache/cache_ws.c b/bin/varnishd/cache/cache_ws.c
index 17245b1..0ee8124 100644
--- a/bin/varnishd/cache/cache_ws.c
+++ b/bin/varnishd/cache/cache_ws.c
@@ -85,7 +85,7 @@ WS_Init(struct ws *ws, const char *id, void *space, unsigned len)
static void
WS_MarkOverflow(struct ws *ws)
{
- WS_Assert(ws);
+ CHECK_OBJ_NOTNULL(ws, WS_MAGIC);
ws->id[0] &= ~0x40; // Cheasy toupper()
}
@@ -220,7 +220,7 @@ WS_ReleaseP(struct ws *ws, char *ptr)
int
WS_Overflowed(const struct ws *ws)
{
- WS_Assert(ws);
+ CHECK_OBJ_NOTNULL(ws, WS_MAGIC);
if (ws->id[0] & 0x40)
return (0);
More information about the varnish-commit
mailing list