From ed5bdd4aca5978ef3ed3d7d22d70f566a8fe27b5 Mon Sep 17 00:00:00 2001 From: Sebastian Benoit Date: Mon, 25 Nov 2013 13:01:19 +0000 Subject: use u_char for buffers in yylex, for ctype calls found by millert@, ok deraadt@ --- sbin/pfctl/parse.y | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sbin/pfctl/parse.y') diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 719727a4957..7285d9d821b 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.627 2013/11/22 04:12:48 deraadt Exp $ */ +/* $OpenBSD: parse.y,v 1.628 2013/11/25 12:52:45 benno Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -5536,9 +5536,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 @@ -5630,8 +5630,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; @@ -5654,7 +5654,7 @@ top: return (findeol()); } if (isalnum(c) || c == '_') { - *p++ = (char)c; + *p++ = c; continue; } *p = '\0'; @@ -5699,7 +5699,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