diff options
author | benno <benno@openbsd.org> | 2013-11-25 12:51:10 +0000 |
---|---|---|
committer | benno <benno@openbsd.org> | 2013-11-25 12:51:10 +0000 |
commit | 015d7b4d303f17f3079eeedd5b6c22565f43398b (patch) | |
tree | cbf19897b38b1abf573420bbea143a72ee7cb7f5 /usr.sbin/ospfd/parse.y | |
parent | netstat -Ar leaked some kernel pointers to unprivileged users. Use (diff) | |
download | wireguard-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/ospfd/parse.y')
-rw-r--r-- | usr.sbin/ospfd/parse.y | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/ospfd/parse.y b/usr.sbin/ospfd/parse.y index 004d1f05637..55b596e5bed 100644 --- a/usr.sbin/ospfd/parse.y +++ b/usr.sbin/ospfd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.74 2013/03/06 21:36:57 sthen Exp $ */ +/* $OpenBSD: parse.y,v 1.75 2013/11/25 12:59:34 benno Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -764,9 +764,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 @@ -859,8 +859,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; @@ -883,7 +883,7 @@ top: return (findeol()); } if (isalnum(c) || c == '_') { - *p++ = (char)c; + *p++ = c; continue; } *p = '\0'; @@ -928,7 +928,7 @@ top: yyerror("string too long"); return (findeol()); } - *p++ = (char)c; + *p++ = c; } yylval.v.string = strdup(buf); if (yylval.v.string == NULL) |