diff options
author | Sebastian Benoit <benno@cvs.openbsd.org> | 2013-11-25 13:12:24 +0000 |
---|---|---|
committer | Sebastian Benoit <benno@cvs.openbsd.org> | 2013-11-25 13:12:24 +0000 |
commit | 78fedc4cb3ef97014fd3f0637c910a03714ee498 (patch) | |
tree | b4aaf01821c31c277976bd8b29897b220d1cf263 | |
parent | ed5bdd4aca5978ef3ed3d7d22d70f566a8fe27b5 (diff) |
use u_char for buffers in yylex, for ctype calls
found by millert@, from deraadt@
-rw-r--r-- | sbin/iked/parse.y | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sbin/iked/parse.y b/sbin/iked/parse.y index d9f3f93e365..b9dd157c62e 100644 --- a/sbin/iked/parse.y +++ b/sbin/iked/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.31 2013/11/22 04:12:47 deraadt Exp $ */ +/* $OpenBSD: parse.y,v 1.32 2013/11/25 13:12:23 benno Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -1117,9 +1117,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 @@ -1211,8 +1211,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; @@ -1235,7 +1235,7 @@ top: return (findeol()); } if (isalnum(c) || c == '_') { - *p++ = (char)c; + *p++ = c; continue; } *p = '\0'; @@ -1280,7 +1280,7 @@ top: yyerror("string too long"); return (findeol()); } - *p++ = (char)c; + *p++ = c; } yylval.v.string = strdup(buf); if (yylval.v.string == NULL) |