From 78fedc4cb3ef97014fd3f0637c910a03714ee498 Mon Sep 17 00:00:00 2001 From: Sebastian Benoit Date: Mon, 25 Nov 2013 13:12:24 +0000 Subject: use u_char for buffers in yylex, for ctype calls found by millert@, from deraadt@ --- sbin/iked/parse.y | 14 +++++++------- 1 file 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 @@ -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) -- cgit v1.2.3