gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnugo-devel] Another array bound violation 3.1.10


From: Teun Burgers
Subject: [gnugo-devel] Another array bound violation 3.1.10
Date: Tue, 16 Oct 2001 17:18:41 +0200

This patch adds an assertion to include_eyepoint.
It is triggered when life.tst test 1001 is run.


Teun
Index: life.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/life.c,v
retrieving revision 1.8
diff -u -r1.8 life.c
--- life.c      2001/10/12 15:09:52     1.8
+++ life.c      2001/10/16 15:15:04
@@ -314,6 +314,12 @@
 include_eyepoint(int i, int j, int proper, int restrictions)
 {
   if (eyeindex[i][j] == -1) {
+    /* FIXME
+     * Should this be < MAX_EYE_SIZE?
+     * The list of eyes in eyei, eyej is ended
+     * with (-1, -1)
+     */
+    ASSERT2(eyesize <= MAX_EYE_SIZE, i, j);
     eyeindex[i][j] = eyesize;
     eyei[eyesize] = i;
     eyej[eyesize] = j;

reply via email to

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