summaryrefslogtreecommitdiffstats
path: root/usr.sbin/dvmrpd
diff options
context:
space:
mode:
authorbenno <benno@openbsd.org>2013-11-25 12:51:10 +0000
committerbenno <benno@openbsd.org>2013-11-25 12:51:10 +0000
commit015d7b4d303f17f3079eeedd5b6c22565f43398b (patch)
treecbf19897b38b1abf573420bbea143a72ee7cb7f5 /usr.sbin/dvmrpd
parentnetstat -Ar leaked some kernel pointers to unprivileged users. Use (diff)
downloadwireguard-openbsd-015d7b4d303f17f3079eeedd5b6c22565f43398b.tar.xz
wireguard-openbsd-015d7b4d303f17f3079eeedd5b6c22565f43398b.zip
use u_char for buffers in yylex, for ctype calls
found by millert@, ok deraadt@
Diffstat (limited to 'usr.sbin/dvmrpd')
-rw-r--r--usr.sbin/dvmrpd/parse.y14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/dvmrpd/parse.y b/usr.sbin/dvmrpd/parse.y
index 4aa4fe08c7b..e19a32dc53a 100644
--- a/usr.sbin/dvmrpd/parse.y
+++ b/usr.sbin/dvmrpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.24 2013/04/21 04:33:41 deraadt Exp $ */
+/* $OpenBSD: parse.y,v 1.25 2013/11/25 12:54:14 benno Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -409,9 +409,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
@@ -504,8 +504,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;
@@ -528,7 +528,7 @@ top:
return (findeol());
}
if (isalnum(c) || c == '_') {
- *p++ = (char)c;
+ *p++ = c;
continue;
}
*p = '\0';
@@ -573,7 +573,7 @@ top:
yyerror("string too long");
return (findeol());
}
- *p++ = (char)c;
+ *p++ = c;
}
yylval.v.string = strdup(buf);
if (yylval.v.string == NULL)