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

Use weaker plain magic check for WS overflows to avoid recursive panics

parent 3be8ba2d
...@@ -85,7 +85,7 @@ WS_Init(struct ws *ws, const char *id, void *space, unsigned len) ...@@ -85,7 +85,7 @@ WS_Init(struct ws *ws, const char *id, void *space, unsigned len)
static void static void
WS_MarkOverflow(struct ws *ws) WS_MarkOverflow(struct ws *ws)
{ {
WS_Assert(ws); CHECK_OBJ_NOTNULL(ws, WS_MAGIC);
ws->id[0] &= ~0x40; // Cheasy toupper() ws->id[0] &= ~0x40; // Cheasy toupper()
} }
...@@ -220,7 +220,7 @@ WS_ReleaseP(struct ws *ws, char *ptr) ...@@ -220,7 +220,7 @@ WS_ReleaseP(struct ws *ws, char *ptr)
int int
WS_Overflowed(const struct ws *ws) WS_Overflowed(const struct ws *ws)
{ {
WS_Assert(ws); CHECK_OBJ_NOTNULL(ws, WS_MAGIC);
if (ws->id[0] & 0x40) if (ws->id[0] & 0x40)
return (0); return (0);
......
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