Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2004:
[Freeciv-Dev] (PR#8975) cm clear_cache() called before build_cache3()
Home

[Freeciv-Dev] (PR#8975) cm clear_cache() called before build_cache3()

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#8975) cm clear_cache() called before build_cache3()
From: "James Canete" <use_less@xxxxxxxxxxx>
Date: Sun, 13 Jun 2004 13:13:31 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8975 >

> [jdorje - Sun Jun 13 16:33:42 2004]:
> 
> 
> But without the assert added in there is no NULL dereference.  The 
> pointer is NULL but it's never dereferenced.
> 

Doesn't this line in clear_cache() dereference it?
      if (!cache3.results[i].combinations[j].is_valid) {

That's assuming MAX_FIELDS_USED and MAX_COMBINATIONS are both nonzero,
though.  MAX_COMBINATIONS is #define'd to 150, and MAX_FIELDS_USED is
#define'd to (CITY_TILES - 1).

Also, it seems like PR#8977 crashes in exactly the same place.

-James Canete


[Prev in Thread] Current Thread [Next in Thread]