chiark
/
gitweb
/
~ian
/
sgt-puzzles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
47e9419
)
Bah; r4954 introduced an array overrun.
author
Simon Tatham
<anakin@pobox.com>
Wed, 8 Dec 2004 09:37:57 +0000
(09:37 +0000)
committer
Simon Tatham
<anakin@pobox.com>
Wed, 8 Dec 2004 09:37:57 +0000
(09:37 +0000)
[originally from svn r4955]
[r4954 ==
47e9419452a9fca895f1c84412ab1040d1aa86a5
]
pattern.c
patch
|
blob
|
history
diff --git
a/pattern.c
b/pattern.c
index ca71fba241c165e0b3d949c7e6a8ebb4c8b8962d..e7b99b31f53bf6a20a7409037b25d4f79ba3f975 100644
(file)
--- a/
pattern.c
+++ b/
pattern.c
@@
-330,7
+330,7
@@
int compute_rowdata(int *ret, unsigned char *start, int len, int step)
i += runlen;
}
i += runlen;
}
- if (start[i*step] == GRID_UNKNOWN)
+ if (
i < len &&
start[i*step] == GRID_UNKNOWN)
return -1;
}
return -1;
}