projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f80d38
)
ascii.c (ascii_reserve) Added assertion.
author
John Darrington
<john@darrington.wattle.id.au>
Sat, 25 Feb 2012 11:15:03 +0000
(12:15 +0100)
committer
John Darrington
<john@darrington.wattle.id.au>
Sun, 26 Feb 2012 18:32:13 +0000
(19:32 +0100)
Added this assertion to catch a yet-to-be fixed array bounds bug.
src/output/ascii.c
patch
|
blob
|
history
diff --git
a/src/output/ascii.c
b/src/output/ascii.c
index 1c3e6b8238f8f7f0739310ae64bfea6b5778c3bb..7804ade3f475d9e0cc08fa281be5a2d5ed6677d5 100644
(file)
--- a/
src/output/ascii.c
+++ b/
src/output/ascii.c
@@
-749,7
+749,9
@@
find_ascii_pos (struct ascii_line *line, int target_x, struct ascii_pos *c)
static char *
ascii_reserve (struct ascii_driver *a, int y, int x0, int x1, int n)
{
- struct ascii_line *line = &a->lines[y];
+ struct ascii_line *line;
+ assert (y < a->allocated_lines);
+ line = &a->lines[y];
if (x0 >= line->width)
{