diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2001-12-05 17:11:55 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2001-12-05 17:11:55 +0000 |
commit | b119fd7126601ce04b2b7a4f6044323507ece969 (patch) | |
tree | 388538decb08455840e78b75f6be397618964711 | |
parent | 1cf31561089989968267ccb825fce8e0c15cf04c (diff) |
Correctly parse hex numbers. Spotted by Claudio Jeker. Closes PR 2234.
-rw-r--r-- | sbin/pfctl/parse.y | 6 |
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; } |