mirror of
https://github.com/sheumann/hush.git
synced 2025-01-03 00:31:16 +00:00
Fix in_ether bug regarding hex digits reported by Jonas Holmberg <jonas.holmberg@axis.com>.
This commit is contained in:
parent
36eff9ac55
commit
049dc25fe7
@ -15,7 +15,7 @@
|
|||||||
* Foundation; either version 2 of the License, or (at
|
* Foundation; either version 2 of the License, or (at
|
||||||
* your option) any later version.
|
* 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') {
|
if (c >= '0' && c <= '9') {
|
||||||
c -= '0';
|
c -= '0';
|
||||||
} else if (c >= 'a' && c <= 'f') {
|
} else if (c >= 'a' && c <= 'f') {
|
||||||
c -= ('a' + 10);
|
c -= ('a' - 10);
|
||||||
} else if (c >= 'A' && c <= 'F') {
|
} else if (c >= 'A' && c <= 'F') {
|
||||||
c -= ('A' + 10);
|
c -= ('A' - 10);
|
||||||
} else if (j && (c == ':' || c == 0)) {
|
} else if (j && (c == ':' || c == 0)) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* Foundation; either version 2 of the License, or (at
|
* Foundation; either version 2 of the License, or (at
|
||||||
* your option) any later version.
|
* 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') {
|
if (c >= '0' && c <= '9') {
|
||||||
c -= '0';
|
c -= '0';
|
||||||
} else if (c >= 'a' && c <= 'f') {
|
} else if (c >= 'a' && c <= 'f') {
|
||||||
c -= ('a' + 10);
|
c -= ('a' - 10);
|
||||||
} else if (c >= 'A' && c <= 'F') {
|
} else if (c >= 'A' && c <= 'F') {
|
||||||
c -= ('A' + 10);
|
c -= ('A' - 10);
|
||||||
} else if (j && (c == ':' || c == 0)) {
|
} else if (j && (c == ':' || c == 0)) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user