[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] 3.3.17: arraybound violation in corner_matchpat
From: |
Teun Burgers |
Subject: |
[gnugo-devel] 3.3.17: arraybound violation in corner_matchpat |
Date: |
Tue, 04 Mar 2003 09:34:32 +0100 |
gnugo 3.3.17 gives an arraybound violation on line 1369 in corner_matchpat
for filllib test 4. pos becomes -12 in this pass of the j loop, which is
a problem for the IS_STONE(board[pos]) test.
Teun
--- matchpat.c.orig 2003-03-04 09:17:36.000000000 +0100
+++ matchpat.c 2003-03-04 09:15:06.000000000 +0100
@@ -1365,6 +1365,7 @@
pos = anchor + i * dy;
for (j = 1; j < database->max_width; j++) {
pos += dx;
+ ASSERT_ON_BOARD1(pos);
num_stones[pos] = num_stones[pos - dx] + num_stones[pos - dy]
- num_stones[pos - dx - dy] + IS_STONE(board[pos]);
}
- [gnugo-devel] 3.3.17: arraybound violation in corner_matchpat,
Teun Burgers <=