mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 12:53:03 +00:00
* src/reader.c (parse_expect_decl): Keep `count' within the size
of `buffer'. From Neil Booth.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user