* src/reader.c (parse_expect_decl): Keep `count' within the size

of `buffer'.
From Neil Booth.
This commit is contained in:
Akim Demaille
2000-10-04 11:31:14 +00:00
parent 42a0c7760b
commit a9e64249c8
11 changed files with 1881 additions and 1985 deletions

View File

@@ -704,7 +704,7 @@ parse_expect_decl (void)
count = 0;
while (c >= '0' && c <= '9')
{
if (count < 20)
if (count < sizeof(buffer) - 1)
buffer[count++] = c;
c = getc (finput);
}