]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bugzilla #197: refreshIsCachable() incorrectly checks entry->mem_obj->reply
authorwessels <>
Fri, 13 Jul 2001 01:40:32 +0000 (01:40 +0000)
committerwessels <>
Fri, 13 Jul 2001 01:40:32 +0000 (01:40 +0000)
The entry->mem_obj->reply is backwards.  It may cause NULL pointer
access.

src/refresh.cc

index 5eb5ee4aae58c978baea14f125afc6addca86181..03dc125044d7eafc280080b08375fbbb50b34d14 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: refresh.cc,v 1.55 2001/01/12 00:37:20 wessels Exp $
+ * $Id: refresh.cc,v 1.56 2001/07/12 19:40:32 wessels Exp $
  *
  * DEBUG: section 22    Refresh Calculation
  * AUTHOR: Harvest Derived
@@ -339,7 +339,7 @@ refreshIsCachable(const StoreEntry * entry)
     if (entry->mem_obj == NULL)
        /* no mem_obj? */
        return 1;
-    if (entry->mem_obj->reply)
+    if (entry->mem_obj->reply == NULL)
        /* no reply? */
        return 1;
     if (entry->mem_obj->reply->content_length == 0)