|
@ -1,4 +1,4 @@ |
|
|
/* $OpenBSD: parse.y,v 1.70 2018/11/01 00:18:44 sashan Exp $ */ |
|
|
|
|
|
|
|
|
/* $OpenBSD: parse.y,v 1.71 2019/02/13 22:57:08 deraadt Exp $ */ |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> |
|
|
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> |
|
@ -668,7 +668,7 @@ yylex(void) |
|
|
if (c == '-' || isdigit(c)) { |
|
|
if (c == '-' || isdigit(c)) { |
|
|
do { |
|
|
do { |
|
|
*p++ = c; |
|
|
*p++ = c; |
|
|
if ((unsigned)(p-buf) >= sizeof(buf)) { |
|
|
|
|
|
|
|
|
if ((size_t)(p-buf) >= sizeof(buf)) { |
|
|
yyerror("string too long"); |
|
|
yyerror("string too long"); |
|
|
return (findeol()); |
|
|
return (findeol()); |
|
|
} |
|
|
} |
|
@ -707,7 +707,7 @@ nodigits: |
|
|
if (isalnum(c) || c == ':' || c == '_' || c == '*') { |
|
|
if (isalnum(c) || c == ':' || c == '_' || c == '*') { |
|
|
do { |
|
|
do { |
|
|
*p++ = c; |
|
|
*p++ = c; |
|
|
if ((unsigned)(p-buf) >= sizeof(buf)) { |
|
|
|
|
|
|
|
|
if ((size_t)(p-buf) >= sizeof(buf)) { |
|
|
yyerror("string too long"); |
|
|
yyerror("string too long"); |
|
|
return (findeol()); |
|
|
return (findeol()); |
|
|
} |
|
|
} |
|
|