1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
$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;
|