aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-12-08 09:37:57 +0000
committerSimon Tatham <anakin@pobox.com>2004-12-08 09:37:57 +0000
commitb18c86241d42a0389dd6f9f7441e9cdd2bc7be06 (patch)
treeae0f2a57f4f474ac954c4e4236202ef85fc006a1
parent47e9419452a9fca895f1c84412ab1040d1aa86a5 (diff)
downloadpuzzles-b18c86241d42a0389dd6f9f7441e9cdd2bc7be06.zip
puzzles-b18c86241d42a0389dd6f9f7441e9cdd2bc7be06.tar.gz
puzzles-b18c86241d42a0389dd6f9f7441e9cdd2bc7be06.tar.bz2
puzzles-b18c86241d42a0389dd6f9f7441e9cdd2bc7be06.tar.xz
Bah; r4954 introduced an array overrun.
[originally from svn r4955] [r4954 == 47e9419452a9fca895f1c84412ab1040d1aa86a5]
-rw-r--r--pattern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pattern.c b/pattern.c
index ca71fba..e7b99b3 100644
--- a/pattern.c
+++ b/pattern.c
@@ -330,7 +330,7 @@ int compute_rowdata(int *ret, unsigned char *start, int len, int step)
i += runlen;
}
- if (start[i*step] == GRID_UNKNOWN)
+ if (i < len && start[i*step] == GRID_UNKNOWN)
return -1;
}