From: wessels <> Date: Fri, 13 Jul 2001 01:40:32 +0000 (+0000) Subject: Bugzilla #197: refreshIsCachable() incorrectly checks entry->mem_obj->reply X-Git-Tag: SQUID_3_0_PRE1~1468 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49dd3c2cd08c09f35dd39925608339993dbb9fce;p=thirdparty%2Fsquid.git Bugzilla #197: refreshIsCachable() incorrectly checks entry->mem_obj->reply The entry->mem_obj->reply is backwards. It may cause NULL pointer access. --- diff --git a/src/refresh.cc b/src/refresh.cc index 5eb5ee4aae..03dc125044 100644 --- a/src/refresh.cc +++ b/src/refresh.cc @@ -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)