2013-09-26 17:14:40 +02:00

97 lines
2.8 KiB
Plaintext

$NetBSD: patch-ay,v 1.1 2006/04/21 02:07:54 wulf Exp $
--- box_wp.c.orig 2006-04-14 11:59:04.000000000 +0930
+++ box_wp.c 2006-04-14 12:00:39.000000000 +0930
@@ -100,26 +100,26 @@
get_pquoted(&p, hs); /* version */
s = hs;
- while (*s) if (!isdigit(*s++)) return -1;
+ while (*s) if (!isdigit((u_char) *s++)) return -1;
wpb->version = atol(hs);
if (!valid_wprot_version(wpb->version)) return -1;
get_pquoted(&p, hs); /* timestamp */
s = hs;
- while (*s) if (!isdigit(*s++)) return -1;
+ while (*s) if (!isdigit((u_char) *s++)) return -1;
wpb->timestamp = atol(hs);
if (!valid_wprot_timestamp(wpb->timestamp)) return -1;
get_pquoted(&p, hs); /* hops */
s = hs;
- while (*s) if (!isdigit(*s++)) return -1;
+ while (*s) if (!isdigit((u_char) *s++)) return -1;
wpb->hops = atoi(hs);
if (wpb->hops < 1) return -1;
if (wpb->hops > MAXWPHOPS) return -1;
get_pquoted(&p, hs); /* quality */
s = hs;
- while (*s) if (!isdigit(*s++)) return -1;
+ while (*s) if (!isdigit((u_char) *s++)) return -1;
wpb->quality = atol(hs);
get_pquoted(&p, hs); /* must be empty */
@@ -197,7 +197,7 @@
get_pquoted(&p, hs); /* version */
s = hs;
- while (*s) if (!isdigit(*s++)) return -1;
+ while (*s) if (!isdigit((u_char) *s++)) return -1;
wpb->version = atol(hs);
if (!valid_wprot_version(wpb->version)) return -1;
@@ -205,7 +205,7 @@
if (!strcmp(hs, "?")) wpb->status = 0;
else {
s = hs;
- while (*s) if (!isdigit(*s++)) return -1;
+ while (*s) if (!isdigit((u_char) *s++)) return -1;
wpb->status = atoi(hs);
}
@@ -223,13 +223,13 @@
get_pquoted(&p, hs); /* timestamp */
s = hs;
- while (*s) if (!isdigit(*s++)) return -1;
+ while (*s) if (!isdigit((u_char) *s++)) return -1;
wpb->timestamp = atol(hs);
if (!valid_wprot_timestamp(wpb->timestamp)) return -1;
get_pquoted(&p, hs); /* hops */
s = hs;
- while (*s) if (!isdigit(*s++)) return -1;
+ while (*s) if (!isdigit((u_char) *s++)) return -1;
wpb->hops = atoi(hs);
if (wpb->hops < 1) return -1;
if (wpb->hops > MAXWPHOPS) return -1;
@@ -312,7 +312,7 @@
get_pquoted(&p, hs); /* timestamp */
s = hs;
- while (*s) if (!isdigit(*s++)) {
+ while (*s) if (!isdigit((u_char) *s++)) {
debug(5, -1, 228, "invalid digit in timestamp");
return -1;
}
@@ -332,7 +332,7 @@
get_pquoted(&p, hs); /* hops */
s = hs;
- while (*s) if (!isdigit(*s++)) {
+ while (*s) if (!isdigit((u_char) *s++)) {
debug(5, -1, 228, "invalid digit in hops");
return -1;
}
@@ -435,7 +435,7 @@
get_pquoted(&p, hs); /* hops */
s = hs;
- while (*s) if (!isdigit(*s++)) return -1;
+ while (*s) if (!isdigit((u_char) *s++)) return -1;
wpb->hops = atoi(hs);
if (wpb->hops < 1) return -1;
if (wpb->hops > MAXWPHOPS) return -1;