aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2001-03-26 16:26:16 +0000
committerManuel Novoa III <mjn3@codepoet.org>2001-03-26 16:26:16 +0000
commit049dc25fe77b1225d50460800b911d765f120e85 (patch)
tree708bda83ed6c0f2023915a7a340c3ed0fd529bf7
parent36eff9ac554fa8021b3ec573369bfe9470dea379 (diff)
downloadbusybox-049dc25fe77b1225d50460800b911d765f120e85.tar.gz
Fix in_ether bug regarding hex digits reported by Jonas Holmberg <jonas.holmberg@axis.com>.
-rw-r--r--ifconfig.c6
-rw-r--r--networking/ifconfig.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/ifconfig.c b/ifconfig.c
index 704909c69..61d73f56b 100644
--- a/ifconfig.c
+++ b/ifconfig.c
@@ -15,7 +15,7 @@
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*
- * $Id: ifconfig.c,v 1.9 2001/03/15 20:48:45 andersen Exp $
+ * $Id: ifconfig.c,v 1.10 2001/03/26 16:26:16 mjn3 Exp $
*
*/
@@ -472,9 +472,9 @@ in_ether(char *bufp, struct sockaddr *sap)
if (c >= '0' && c <= '9') {
c -= '0';
} else if (c >= 'a' && c <= 'f') {
- c -= ('a' + 10);
+ c -= ('a' - 10);
} else if (c >= 'A' && c <= 'F') {
- c -= ('A' + 10);
+ c -= ('A' - 10);
} else if (j && (c == ':' || c == 0)) {
break;
} else {
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index 704909c69..61d73f56b 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -15,7 +15,7 @@
* Foundation; either version 2 of the License, or (at
* your option) any later version.
*
- * $Id: ifconfig.c,v 1.9 2001/03/15 20:48:45 andersen Exp $
+ * $Id: ifconfig.c,v 1.10 2001/03/26 16:26:16 mjn3 Exp $
*
*/
@@ -472,9 +472,9 @@ in_ether(char *bufp, struct sockaddr *sap)
if (c >= '0' && c <= '9') {
c -= '0';
} else if (c >= 'a' && c <= 'f') {
- c -= ('a' + 10);
+ c -= ('a' - 10);
} else if (c >= 'A' && c <= 'F') {
- c -= ('A' + 10);
+ c -= ('A' - 10);
} else if (j && (c == ':' || c == 0)) {
break;
} else {