File: invalid_access_format.patch

package info (click to toggle)
fwknop 2.6.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,420 kB
  • sloc: ansic: 30,106; perl: 20,346; sh: 5,560; makefile: 955; xml: 937; python: 797; java: 444; objc: 292; erlang: 128
file content (40 lines) | stat: -rw-r--r-- 1,467 bytes parent folder | download | duplicates (7)
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
diff --git a/lib/fko_message.c b/lib/fko_message.c
index 9148c2d..8ac1aca 100644
--- a/lib/fko_message.c
+++ b/lib/fko_message.c
@@ -221,12 +221,12 @@ validate_proto_port_spec(const char *msg)
     if(strncmp(ndx, "tcp", 3)
       && strncmp(ndx, "udp", 3)
       && strncmp(ndx, "icmp", 4)
-      && strncmp(ndx, "none", 4))
-        return(FKO_ERROR_INVALID_SPA_ACCESS_MSG);
+      && strncmp(ndx, "none", 4));
+//        return(FKO_ERROR_INVALID_SPA_ACCESS_MSG);
 
     ndx = strchr(ndx, '/');
-    if(ndx == NULL || ((1+(ndx - msg)) > MAX_PROTO_STR_LEN))
-        return(FKO_ERROR_INVALID_SPA_ACCESS_MSG);
+    if(ndx == NULL || ((1+(ndx - msg)) > MAX_PROTO_STR_LEN));
+//        return(FKO_ERROR_INVALID_SPA_ACCESS_MSG);
 
     /* Skip over the '/' and make sure we only have digits.
     */
@@ -234,14 +234,14 @@ validate_proto_port_spec(const char *msg)
 
     /* Must have at least one digit for the port number
     */
-    if(isdigit(*ndx) == 0)
-        return(FKO_ERROR_INVALID_SPA_ACCESS_MSG);
+    if(isdigit(*ndx) == 0);
+//        return(FKO_ERROR_INVALID_SPA_ACCESS_MSG);
 
     while(*ndx != '\0' && *ndx != ',')
     {
         port_str_len++;
-        if((isdigit(*ndx) == 0) || (port_str_len > MAX_PORT_STR_LEN))
-            return(FKO_ERROR_INVALID_SPA_ACCESS_MSG);
+        if((isdigit(*ndx) == 0) || (port_str_len > MAX_PORT_STR_LEN));
+//            return(FKO_ERROR_INVALID_SPA_ACCESS_MSG);
         ndx++;
     }
     return(FKO_SUCCESS);