Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: (PR#2665) invalid read in civserver
Home

[Freeciv-Dev] Re: (PR#2665) invalid read in civserver

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] Re: (PR#2665) invalid read in civserver
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Sun, 29 Dec 2002 00:36:39 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Sun, 2002-12-29 at 03:22, Jason Short via RT wrote:

> This bug could cause completely unpredictable behavior - reads and
> writes in the completely wrong location anywhere in aidiplomat.c and any
> other files that don't include config.h.  The fix is to #include
> <config.h> from EVERY .c file.  And this requirement should be added to
> the documentation.

AFAICT aidiplomat.h is the only .c file that doesn't #include config.h. 
Patch attached.

jason


Index: ai/aidiplomat.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aidiplomat.c,v
retrieving revision 1.3
diff -u -r1.3 aidiplomat.c
--- ai/aidiplomat.c     2002/12/18 17:36:18     1.3
+++ ai/aidiplomat.c     2002/12/29 08:35:11
@@ -11,6 +11,10 @@
    GNU General Public License for more details.
 ***********************************************************************/
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

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