[master] 49cd9e6 clear a ws overflow when resetting

Nils Goroll nils.goroll at uplex.de
Wed Mar 4 16:16:28 CET 2015


commit 49cd9e68a49f6ec7e8c937e2b48e379d68064c75
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Mar 4 15:48:56 2015 +0100

    clear a ws overflow when resetting

diff --git a/bin/varnishd/cache/cache_ws.c b/bin/varnishd/cache/cache_ws.c
index c6f2d6a..d93aee4 100644
--- a/bin/varnishd/cache/cache_ws.c
+++ b/bin/varnishd/cache/cache_ws.c
@@ -93,6 +93,14 @@ WS_MarkOverflow(struct ws *ws)
 	ws->id[0] &= ~0x40;		// Cheasy toupper()
 }
 
+static void
+ws_ClearOverflow(struct ws *ws)
+{
+	CHECK_OBJ_NOTNULL(ws, WS_MAGIC);
+
+	ws->id[0] |= 0x40;		// Cheasy tolower()
+}
+
 /*
  * Reset a WS to start or a given pointer, likely from WS_Snapshot
  */
@@ -111,6 +119,7 @@ WS_Reset(struct ws *ws, char *p)
 		assert(p < ws->e);
 		ws->f = p;
 	}
+	ws_ClearOverflow(ws);
 	WS_Assert(ws);
 }
 



More information about the varnish-commit mailing list