]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix a memory corruption when building the magic Vary marker object headers
authorhno <>
Tue, 23 May 2006 22:22:34 +0000 (22:22 +0000)
committerhno <>
Tue, 23 May 2006 22:22:34 +0000 (22:22 +0000)
somehow this cast made things go very bad. Luckily it isn't needed as
we already hold a reference to the reply a few lines earlier.

src/store.cc

index 3fe269c2896a27e43748a5829a3943e6ced09a79..85c60a78ce43d4462d0bdb0b8eac95401bf633a1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.593 2006/05/19 23:10:20 wessels Exp $
+ * $Id: store.cc,v 1.594 2006/05/23 16:22:34 hno Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -709,7 +709,7 @@ storeSetPublicKey(StoreEntry * e)
 
             if (vary.size()) {
                 /* Again, we own this structure layout */
-                ((HttpHeader) pe->getReply()->header).putStr(HDR_VARY, vary.buf());
+                rep->header.putStr(HDR_VARY, vary.buf());
                 vary.clean();
             }
 
@@ -718,7 +718,7 @@ storeSetPublicKey(StoreEntry * e)
 
             if (vary.buf()) {
                 /* Again, we own this structure layout */
-                ((HttpHeader) pe->getReply()->header).putStr(HDR_X_ACCELERATOR_VARY, vary.buf());
+                rep->header.putStr(HDR_X_ACCELERATOR_VARY, vary.buf());
                 vary.clean();
             }