summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordhartmei <dhartmei@openbsd.org>2001-12-05 17:11:54 +0000
committerdhartmei <dhartmei@openbsd.org>2001-12-05 17:11:54 +0000
commit6df3b8d8845c603db3454e1ef3f87727188e7a4d (patch)
tree789c148dff266582af406f6e3178618698f53aa0
parentPut back to the old KMEM size, until we can increase this and have it work (diff)
downloadwireguard-openbsd-6df3b8d8845c603db3454e1ef3f87727188e7a4d.tar.xz
wireguard-openbsd-6df3b8d8845c603db3454e1ef3f87727188e7a4d.zip
Correctly parse hex numbers. Spotted by Claudio Jeker. Closes PR 2234.
-rw-r--r--sbin/pfctl/parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index d354e2b8937..3e4b367ba8f 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.45 2001/12/03 21:52:08 dhartmei Exp $ */
+/* $OpenBSD: parse.y,v 1.46 2001/12/05 17:11:54 dhartmei Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -1531,9 +1531,9 @@ top:
if (isdigit(c))
c -= '0';
else if (c >= 'a' && c <= 'f')
- c -= 'a';
+ c -= 'a' - 10;
else if (c >= 'A' && c <= 'F')
- c -= 'A';
+ c -= 'A' - 10;
else
break;
}