diff options
author | Sebastian Benoit <benno@cvs.openbsd.org> | 2013-11-25 13:01:19 +0000 |
---|---|---|
committer | Sebastian Benoit <benno@cvs.openbsd.org> | 2013-11-25 13:01:19 +0000 |
commit | ed5bdd4aca5978ef3ed3d7d22d70f566a8fe27b5 (patch) | |
tree | a0bfd8f3cfc715c63acf2ec9f601971acda54b1f /usr.sbin/ldpd | |
parent | 0542d0f6f0f199be15e8de248d85f4a68ab514f4 (diff) |
use u_char for buffers in yylex, for ctype calls
found by millert@, ok deraadt@
Diffstat (limited to 'usr.sbin/ldpd')
-rw-r--r-- | usr.sbin/ldpd/parse.y | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/ldpd/parse.y b/usr.sbin/ldpd/parse.y index bface5f8bfa..b497e383980 100644 --- a/usr.sbin/ldpd/parse.y +++ b/usr.sbin/ldpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.18 2013/10/15 20:13:47 renato Exp $ */ +/* $OpenBSD: parse.y,v 1.19 2013/11/25 12:57:42 benno Exp $ */ /* * Copyright (c) 2004, 2005, 2008 Esben Norby <norby@openbsd.org> @@ -426,9 +426,9 @@ lookup(char *s) #define MAXPUSHBACK 128 -char *parsebuf; +u_char *parsebuf; int parseindex; -char pushback_buffer[MAXPUSHBACK]; +u_char pushback_buffer[MAXPUSHBACK]; int pushback_index = 0; int @@ -519,8 +519,8 @@ findeol(void) int yylex(void) { - char buf[8096]; - char *p, *val; + u_char buf[8096]; + u_char *p, *val; int quotec, next, c; int token; @@ -543,7 +543,7 @@ top: return (findeol()); } if (isalnum(c) || c == '_') { - *p++ = (char)c; + *p++ = c; continue; } *p = '\0'; @@ -588,7 +588,7 @@ top: yyerror("string too long"); return (findeol()); } - *p++ = (char)c; + *p++ = c; } yylval.v.string = strdup(buf); if (yylval.v.string == NULL) |