summaryrefslogtreecommitdiffstats
path: root/usr.sbin/acme-client
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2019-02-13 22:57:07 +0000
committerderaadt <deraadt@openbsd.org>2019-02-13 22:57:07 +0000
commit915c3f33d30399505d94a06fc5123e4bbdc9531f (patch)
treeee3b909e9fc1fb29e610142968bc73a972634746 /usr.sbin/acme-client
parentsync (diff)
downloadwireguard-openbsd-915c3f33d30399505d94a06fc5123e4bbdc9531f.tar.xz
wireguard-openbsd-915c3f33d30399505d94a06fc5123e4bbdc9531f.zip
(unsigned) means (unsigned int) which on ptrdiff_t or size_t or other
larger types really is a range reduction... Almost any cast to (unsigned) is a bug. ok millert tb benno
Diffstat (limited to 'usr.sbin/acme-client')
-rw-r--r--usr.sbin/acme-client/parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/acme-client/parse.y b/usr.sbin/acme-client/parse.y
index 5f7785bbb32..220269ed279 100644
--- a/usr.sbin/acme-client/parse.y
+++ b/usr.sbin/acme-client/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.32 2019/01/29 16:38:29 benno Exp $ */
+/* $OpenBSD: parse.y,v 1.33 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -646,7 +646,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return findeol();
}
@@ -685,7 +685,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}