summaryrefslogtreecommitdiff
path: root/sbin/pfctl/parse.y
diff options
context:
space:
mode:
authorSebastian Benoit <benno@cvs.openbsd.org>2013-11-25 13:01:19 +0000
committerSebastian Benoit <benno@cvs.openbsd.org>2013-11-25 13:01:19 +0000
commited5bdd4aca5978ef3ed3d7d22d70f566a8fe27b5 (patch)
treea0bfd8f3cfc715c63acf2ec9f601971acda54b1f /sbin/pfctl/parse.y
parent0542d0f6f0f199be15e8de248d85f4a68ab514f4 (diff)
use u_char for buffers in yylex, for ctype calls
found by millert@, ok deraadt@
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r--sbin/pfctl/parse.y14
1 files changed, 7 insertions, 7 deletions
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)