Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | int | - |
14 | match_pattern(const char *s, const char *pattern) | - |
15 | { | - |
16 | for (;;) { | - |
17 | | - |
18 | if (!*patternTRUE | evaluated 162 times by 2 tests | FALSE | evaluated 16225 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
) | 162-16225 |
19 | returnexecuted 162 times by 2 tests: return !*s; !*s;executed 162 times by 2 tests: return !*s; | 162 |
20 | | - |
21 | if (*TRUE | evaluated 250 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | evaluated 15975 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
pattern == '*'TRUE | evaluated 250 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | evaluated 15975 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
) { | 250-15975 |
22 | | - |
23 | pattern++; | - |
24 | | - |
25 | | - |
26 | if (!*patternTRUE | evaluated 117 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | evaluated 133 times by 2 tests |
) | 117-133 |
27 | returnexecuted 117 times by 3 tests: return 1; Executed by:- test_hostkeys
- test_kex
- test_match
1;executed 117 times by 3 tests: return 1; Executed by:- test_hostkeys
- test_kex
- test_match
| 117 |
28 | | - |
29 | | - |
30 | if (*TRUE | evaluated 133 times by 2 tests | FALSE | never evaluated |
pattern != '?'TRUE | evaluated 133 times by 2 tests | FALSE | never evaluated |
&& *TRUE | evaluated 132 times by 2 tests | FALSE | evaluated 1 time by 1 test |
pattern != '*'TRUE | evaluated 132 times by 2 tests | FALSE | evaluated 1 time by 1 test |
) { | 0-133 |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | for (; *TRUE | evaluated 1664 times by 2 tests | FALSE | evaluated 91 times by 2 tests |
sTRUE | evaluated 1664 times by 2 tests | FALSE | evaluated 91 times by 2 tests |
; s++) | 91-1664 |
37 | if (*TRUE | evaluated 198 times by 2 tests | FALSE | evaluated 1466 times by 2 tests |
s == *patternTRUE | evaluated 198 times by 2 tests | FALSE | evaluated 1466 times by 2 tests |
&& | 198-1466 |
38 | match_pattern(s + 1, pattern + 1)TRUE | evaluated 41 times by 2 tests | FALSE | evaluated 157 times by 2 tests |
) | 41-157 |
39 | returnexecuted 41 times by 2 tests: return 1; 1;executed 41 times by 2 tests: return 1; | 41 |
40 | | - |
41 | returnexecuted 91 times by 2 tests: return 0; 0;executed 91 times by 2 tests: return 0; | 91 |
42 | } | - |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | for (; *TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
sTRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
; s++) | 0-1 |
48 | if (match_pattern(s, pattern)TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
) | 0-1 |
49 | returnexecuted 1 time by 1 test: return 1; 1;executed 1 time by 1 test: return 1; | 1 |
50 | | - |
51 | return never executed: return 0; 0;never executed: return 0; | 0 |
52 | } | - |
53 | | - |
54 | | - |
55 | | - |
56 | | - |
57 | if (!*sTRUE | evaluated 8 times by 1 test | FALSE | evaluated 15967 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
) | 8-15967 |
58 | returnexecuted 8 times by 1 test: return 0; 0;executed 8 times by 1 test: return 0; | 8 |
59 | | - |
60 | | - |
61 | if (*TRUE | evaluated 15962 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | evaluated 5 times by 1 test |
pattern != '?'TRUE | evaluated 15962 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | evaluated 5 times by 1 test |
&& *TRUE | evaluated 2154 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | evaluated 13808 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
pattern != *sTRUE | evaluated 2154 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | evaluated 13808 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
) | 5-15962 |
62 | returnexecuted 2154 times by 3 tests: return 0; Executed by:- test_hostkeys
- test_kex
- test_match
0;executed 2154 times by 3 tests: return 0; Executed by:- test_hostkeys
- test_kex
- test_match
| 2154 |
63 | | - |
64 | | - |
65 | s++; | - |
66 | pattern++; | - |
67 | }executed 13813 times by 3 tests: end of block Executed by:- test_hostkeys
- test_kex
- test_match
| 13813 |
68 | | - |
69 | } never executed: end of block | 0 |
70 | | - |
71 | | - |
72 | | - |
73 | | - |
74 | | - |
75 | | - |
76 | | - |
77 | int | - |
78 | match_pattern_list(const char *string, const char *pattern, int dolower) | - |
79 | { | - |
80 | char sub[1024]; | - |
81 | int negated; | - |
82 | int got_positive; | - |
83 | u_int i, subi, len = strlen(pattern); | - |
84 | | - |
85 | got_positive = 0; | - |
86 | for (i = 0; i < lenTRUE | evaluated 2356 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | evaluated 1136 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
;) { | 1136-2356 |
87 | | - |
88 | if (pattern[i] == '!'TRUE | evaluated 16 times by 1 test | FALSE | evaluated 2340 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
) { | 16-2340 |
89 | negated = 1; | - |
90 | i++; | - |
91 | }executed 16 times by 1 test: end of block else | 16 |
92 | negated = 0;executed 2340 times by 3 tests: negated = 0; Executed by:- test_hostkeys
- test_kex
- test_match
| 2340 |
93 | | - |
94 | | - |
95 | | - |
96 | | - |
97 | | - |
98 | for (subi = 0; | - |
99 | i < lenTRUE | evaluated 30155 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | evaluated 1139 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
&& subi < sizeof(sub) - 1TRUE | evaluated 30155 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | never evaluated |
&& pattern[i] != ','TRUE | evaluated 28938 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | evaluated 1217 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
; | 0-30155 |
100 | subi++, i++) | - |
101 | sub[subi] = dolowerTRUE | evaluated 13500 times by 2 tests | FALSE | evaluated 15438 times by 2 tests |
&& executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 13500-28938 |
102 | ((*TRUE | evaluated 3 times by 1 test | FALSE | evaluated 13497 times by 2 tests |
__ctype_b_loc ())[(int) ((TRUE | evaluated 3 times by 1 test | FALSE | evaluated 13497 times by 2 tests |
executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 3-28938 |
103 | (u_char)pattern[i]TRUE | evaluated 3 times by 1 test | FALSE | evaluated 13497 times by 2 tests |
executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 3-28938 |
104 | ))] & (unsigned short int) _ISupper)TRUE | evaluated 3 times by 1 test | FALSE | evaluated 13497 times by 2 tests |
executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 3-28938 |
105 | ?executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 28938 |
106 | executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 28938 |
107 | (__extension__ ({ int __res; if (sizeof (TRUE | never evaluated | FALSE | evaluated 3 times by 1 test |
executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 0-28938 |
108 | (u_char)pattern[i]TRUE | never evaluated | FALSE | evaluated 3 times by 1 test |
executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 0-28938 |
109 | ) > 1TRUE | never evaluated | FALSE | evaluated 3 times by 1 test |
) { if (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 0-28938 |
110 | (u_char)pattern[i]TRUE | never evaluated | FALSE | never evaluated |
executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 0-28938 |
111 | )TRUE | never evaluated | FALSE | never evaluated |
) { int __c = (executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 0-28938 |
112 | (u_char)pattern[i]executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 28938 |
113 | ); __res = __c < -128TRUE | never evaluated | FALSE | never evaluated |
|| __c > 255TRUE | never evaluated | FALSE | never evaluated |
? __c : (*__ctype_tolower_loc ())[__c]; }never executed: end of block else __res = tolower (never executed: __res = tolower ( (u_char)pattern[i] ); executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 0-28938 |
114 | (u_char)pattern[i] never executed: __res = tolower ( (u_char)pattern[i] ); executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 0-28938 |
115 | ); never executed: __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) (executed 3 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 0-28938 |
116 | (u_char)pattern[i]executed 3 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 3-28938 |
117 | )];executed 3 times by 1 test: __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 3-28938 |
118 | : pattern[i];executed 28938 times by 3 tests: sub[subi] = dolower && ((*__ctype_b_loc ())[(int) (( (u_char)pattern[i] ))] & (unsigned short int) _ISupper) ? (__extension__ ({ int __res; if (sizeof ( (u_char)pattern[i] ) > 1) { if (__builtin_constant_p ( (u_char)pattern[i] )) { int __c = ( (u_char)pattern[i] ); __res = __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (u_char)pattern[i] ); } else __res = (*__ctype_tolower_loc ())[(int) ( (u_char)pattern[i] )]; __res; })) : pattern[i]; Executed by:- test_hostkeys
- test_kex
- test_match
| 28938 |
119 | | - |
120 | if (subi >= sizeof(sub) - 1TRUE | never evaluated | FALSE | evaluated 2356 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
) | 0-2356 |
121 | return never executed: return 0; 0;never executed: return 0; | 0 |
122 | | - |
123 | | - |
124 | if (i < lenTRUE | evaluated 1217 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | evaluated 1139 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
&& pattern[i] == ','TRUE | evaluated 1217 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | never evaluated |
) | 0-1217 |
125 | i++;executed 1217 times by 3 tests: i++; Executed by:- test_hostkeys
- test_kex
- test_match
| 1217 |
126 | | - |
127 | | - |
128 | sub[subi] = '\0'; | - |
129 | | - |
130 | | - |
131 | if (match_pattern(string, sub)TRUE | evaluated 264 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
| FALSE | evaluated 2092 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
) { | 264-2092 |
132 | if (negatedTRUE | evaluated 12 times by 1 test | FALSE | evaluated 252 times by 3 testsEvaluated by:- test_hostkeys
- test_kex
- test_match
|
) | 12-252 |
133 | returnexecuted 12 times by 1 test: return -1; -1;executed 12 times by 1 test: return -1; | 12 |
134 | else | - |
135 | got_positive = 1;executed 252 times by 3 tests: got_positive = 1; Executed by:- test_hostkeys
- test_kex
- test_match
| 252 |
136 | } | - |
137 | }executed 2344 times by 3 tests: end of block Executed by:- test_hostkeys
- test_kex
- test_match
| 2344 |
138 | | - |
139 | | - |
140 | | - |
141 | | - |
142 | | - |
143 | returnexecuted 1136 times by 3 tests: return got_positive; Executed by:- test_hostkeys
- test_kex
- test_match
got_positive;executed 1136 times by 3 tests: return got_positive; Executed by:- test_hostkeys
- test_kex
- test_match
| 1136 |
144 | } | - |
145 | | - |
146 | | - |
147 | | - |
148 | | - |
149 | | - |
150 | | - |
151 | | - |
152 | int | - |
153 | match_hostname(const char *host, const char *pattern) | - |
154 | { | - |
155 | char *hostcopy = xstrdup(host); | - |
156 | int r; | - |
157 | | - |
158 | lowercase(hostcopy); | - |
159 | r = match_pattern_list(hostcopy, pattern, 1); | - |
160 | free(hostcopy); | - |
161 | returnexecuted 520 times by 1 test: return r; r;executed 520 times by 1 test: return r; | 520 |
162 | } | - |
163 | | - |
164 | | - |
165 | | - |
166 | | - |
167 | | - |
168 | | - |
169 | int | - |
170 | match_host_and_ip(const char *host, const char *ipaddr, | - |
171 | const char *patterns) | - |
172 | { | - |
173 | int mhost, mip; | - |
174 | | - |
175 | if ((TRUE | never evaluated | FALSE | never evaluated |
mip = addr_match_list(ipaddr, patterns)) == -2TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
176 | return never executed: return -1; -1;never executed: return -1; | 0 |
177 | else if (host == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
178 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
179 | || ipaddr == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
180 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
181 | || mip == -1TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
182 | return never executed: return 0; 0;never executed: return 0; | 0 |
183 | | - |
184 | | - |
185 | if ((TRUE | never evaluated | FALSE | never evaluated |
mhost = match_hostname(host, patterns)) == -1TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
186 | return never executed: return 0; 0;never executed: return 0; | 0 |
187 | | - |
188 | if (mhost == 0TRUE | never evaluated | FALSE | never evaluated |
&& mip == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
189 | return never executed: return 0; 0;never executed: return 0; | 0 |
190 | return never executed: return 1; 1;never executed: return 1; | 0 |
191 | } | - |
192 | | - |
193 | | - |
194 | | - |
195 | | - |
196 | | - |
197 | | - |
198 | int | - |
199 | match_user(const char *user, const char *host, const char *ipaddr, | - |
200 | const char *pattern) | - |
201 | { | - |
202 | char *p, *pat; | - |
203 | int ret; | - |
204 | | - |
205 | | - |
206 | if (user == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
207 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
208 | && host == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
209 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
210 | && ipaddr == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
211 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
212 | ) { | - |
213 | if ((TRUE | never evaluated | FALSE | never evaluated |
p = TRUE | never evaluated | FALSE | never evaluated |
| 0 |
214 | (__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
215 | '@'TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
216 | )TRUE | never evaluated | FALSE | never evaluated |
&& !__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
217 | patternTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
218 | )TRUE | never evaluated | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
219 | '@'TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
220 | ) == '\0'TRUE | never evaluated | FALSE | never evaluated |
? (char *) __rawmemchr (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
221 | patternTRUE | never evaluated | FALSE | never evaluated |
| 0 |
222 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
223 | '@'TRUE | never evaluated | FALSE | never evaluated |
| 0 |
224 | ) : __builtin_strchr (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
225 | patternTRUE | never evaluated | FALSE | never evaluated |
| 0 |
226 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
227 | '@'TRUE | never evaluated | FALSE | never evaluated |
| 0 |
228 | )))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
229 | ) != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
230 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
231 | && | - |
232 | match_host_and_ip(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
233 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
234 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
235 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
236 | , p + 1) < 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
237 | return never executed: return -1; -1;never executed: return -1; | 0 |
238 | return never executed: return 0; 0;never executed: return 0; | 0 |
239 | } | - |
240 | | - |
241 | if ((TRUE | never evaluated | FALSE | never evaluated |
p = TRUE | never evaluated | FALSE | never evaluated |
| 0 |
242 | (__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
243 | '@'TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
244 | )TRUE | never evaluated | FALSE | never evaluated |
&& !__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
245 | patternTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
246 | )TRUE | never evaluated | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
247 | '@'TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
248 | ) == '\0'TRUE | never evaluated | FALSE | never evaluated |
? (char *) __rawmemchr (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
249 | patternTRUE | never evaluated | FALSE | never evaluated |
| 0 |
250 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
251 | '@'TRUE | never evaluated | FALSE | never evaluated |
| 0 |
252 | ) : __builtin_strchr (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
253 | patternTRUE | never evaluated | FALSE | never evaluated |
| 0 |
254 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
255 | '@'TRUE | never evaluated | FALSE | never evaluated |
| 0 |
256 | )))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
257 | ) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
258 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
259 | ) | - |
260 | return never executed: return match_pattern(user, pattern); match_pattern(user, pattern);never executed: return match_pattern(user, pattern); | 0 |
261 | | - |
262 | pat = xstrdup(pattern); | - |
263 | p = | - |
264 | (__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
265 | '@'TRUE | never evaluated | FALSE | never evaluated |
| 0 |
266 | )TRUE | never evaluated | FALSE | never evaluated |
&& !__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
267 | patTRUE | never evaluated | FALSE | never evaluated |
| 0 |
268 | )TRUE | never evaluated | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
269 | '@'TRUE | never evaluated | FALSE | never evaluated |
| 0 |
270 | ) == '\0'TRUE | never evaluated | FALSE | never evaluated |
? (char *) __rawmemchr ( | 0 |
271 | pat | - |
272 | , | - |
273 | '@' | - |
274 | ) : __builtin_strchr ( | - |
275 | pat | - |
276 | , | - |
277 | '@' | - |
278 | ))) | - |
279 | ; | - |
280 | *p++ = '\0'; | - |
281 | | - |
282 | if ((TRUE | never evaluated | FALSE | never evaluated |
ret = match_pattern(user, pat)) == 1TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
283 | ret = match_host_and_ip(host, ipaddr, p); never executed: ret = match_host_and_ip(host, ipaddr, p); | 0 |
284 | free(pat); | - |
285 | | - |
286 | return never executed: return ret; ret;never executed: return ret; | 0 |
287 | } | - |
288 | | - |
289 | | - |
290 | | - |
291 | | - |
292 | | - |
293 | | - |
294 | | - |
295 | char * | - |
296 | match_list(const char *client, const char *server, u_int *next) | - |
297 | { | - |
298 | char *sproposals[40]; | - |
299 | char *c, *s, *p, *ret, *cp, *sp; | - |
300 | int i, j, nproposals; | - |
301 | | - |
302 | c = cp = xstrdup(client); | - |
303 | s = sp = xstrdup(server); | - |
304 | | - |
305 | for ((p = | - |
306 | __extension__ ({ char __r0, __r1, __r2; (__builtin_constant_p ( | - |
307 | "," | - |
308 | ) && ((size_t)(const void *)(( | - |
309 | "," | - |
310 | ) + 1) - (size_t)(const void *)( | - |
311 | "," | - |
312 | ) == 1) && (__r0 = ((const char *) ( | - |
313 | "," | - |
314 | ))[0], ((const char *) ( | - |
315 | "," | - |
316 | ))[0] != '\0') ? ((__r1 = ((const char *) ( | - |
317 | "," | - |
318 | ))[1], ((const char *) ( | - |
319 | "," | - |
320 | ))[1] == '\0') ? __strsep_1c ( | - |
321 | &sp | - |
322 | , __r0) : ((__r2 = ((const char *) ( | - |
323 | "," | - |
324 | ))[2], __r2 == '\0') ? __strsep_2c ( | - |
325 | &sp | - |
326 | , __r0, __r1) : (((const char *) ( | - |
327 | "," | - |
328 | ))[3] == '\0' ? __strsep_3c ( | - |
329 | &sp | - |
330 | , __r0, __r1, __r2) : __strsep_g ( | - |
331 | &sp | - |
332 | , | - |
333 | "," | - |
334 | )))) : __strsep_g ( | - |
335 | &sp | - |
336 | , | - |
337 | "," | - |
338 | )); }) | - |
339 | ), i=0; pTRUE | evaluated 5920 times by 1 test | FALSE | evaluated 2080 times by 1 test |
&& *TRUE | evaluated 5920 times by 1 test | FALSE | never evaluated |
p != '\0'TRUE | evaluated 5920 times by 1 test | FALSE | never evaluated |
; | 0-5920 |
340 | (p = | - |
341 | __extension__ ({ char __r0, __r1, __r2; (__builtin_constant_p ( | - |
342 | "," | - |
343 | ) && ((size_t)(const void *)(( | - |
344 | "," | - |
345 | ) + 1) - (size_t)(const void *)( | - |
346 | "," | - |
347 | ) == 1) && (__r0 = ((const char *) ( | - |
348 | "," | - |
349 | ))[0], ((const char *) ( | - |
350 | "," | - |
351 | ))[0] != '\0') ? ((__r1 = ((const char *) ( | - |
352 | "," | - |
353 | ))[1], ((const char *) ( | - |
354 | "," | - |
355 | ))[1] == '\0') ? __strsep_1c ( | - |
356 | &sp | - |
357 | , __r0) : ((__r2 = ((const char *) ( | - |
358 | "," | - |
359 | ))[2], __r2 == '\0') ? __strsep_2c ( | - |
360 | &sp | - |
361 | , __r0, __r1) : (((const char *) ( | - |
362 | "," | - |
363 | ))[3] == '\0' ? __strsep_3c ( | - |
364 | &sp | - |
365 | , __r0, __r1, __r2) : __strsep_g ( | - |
366 | &sp | - |
367 | , | - |
368 | "," | - |
369 | )))) : __strsep_g ( | - |
370 | &sp | - |
371 | , | - |
372 | "," | - |
373 | )); }) | - |
374 | ), i++) { | - |
375 | if (i < 40TRUE | evaluated 5920 times by 1 test | FALSE | never evaluated |
) | 0-5920 |
376 | sproposals[i] = p;executed 5920 times by 1 test: sproposals[i] = p; | 5920 |
377 | else | - |
378 | break; never executed: break; | 0 |
379 | } | - |
380 | nproposals = i; | - |
381 | | - |
382 | for ((p = | - |
383 | __extension__ ({ char __r0, __r1, __r2; (__builtin_constant_p ( | - |
384 | "," | - |
385 | ) && ((size_t)(const void *)(( | - |
386 | "," | - |
387 | ) + 1) - (size_t)(const void *)( | - |
388 | "," | - |
389 | ) == 1) && (__r0 = ((const char *) ( | - |
390 | "," | - |
391 | ))[0], ((const char *) ( | - |
392 | "," | - |
393 | ))[0] != '\0') ? ((__r1 = ((const char *) ( | - |
394 | "," | - |
395 | ))[1], ((const char *) ( | - |
396 | "," | - |
397 | ))[1] == '\0') ? __strsep_1c ( | - |
398 | &cp | - |
399 | , __r0) : ((__r2 = ((const char *) ( | - |
400 | "," | - |
401 | ))[2], __r2 == '\0') ? __strsep_2c ( | - |
402 | &cp | - |
403 | , __r0, __r1) : (((const char *) ( | - |
404 | "," | - |
405 | ))[3] == '\0' ? __strsep_3c ( | - |
406 | &cp | - |
407 | , __r0, __r1, __r2) : __strsep_g ( | - |
408 | &cp | - |
409 | , | - |
410 | "," | - |
411 | )))) : __strsep_g ( | - |
412 | &cp | - |
413 | , | - |
414 | "," | - |
415 | )); }) | - |
416 | ), i=0; pTRUE | evaluated 2080 times by 1 test | FALSE | evaluated 160 times by 1 test |
&& *TRUE | evaluated 2080 times by 1 test | FALSE | never evaluated |
p != '\0'TRUE | evaluated 2080 times by 1 test | FALSE | never evaluated |
; | 0-2080 |
417 | (p = | - |
418 | __extension__ ({ char __r0, __r1, __r2; (__builtin_constant_p ( | - |
419 | "," | - |
420 | ) && ((size_t)(const void *)(( | - |
421 | "," | - |
422 | ) + 1) - (size_t)(const void *)( | - |
423 | "," | - |
424 | ) == 1) && (__r0 = ((const char *) ( | - |
425 | "," | - |
426 | ))[0], ((const char *) ( | - |
427 | "," | - |
428 | ))[0] != '\0') ? ((__r1 = ((const char *) ( | - |
429 | "," | - |
430 | ))[1], ((const char *) ( | - |
431 | "," | - |
432 | ))[1] == '\0') ? __strsep_1c ( | - |
433 | &cp | - |
434 | , __r0) : ((__r2 = ((const char *) ( | - |
435 | "," | - |
436 | ))[2], __r2 == '\0') ? __strsep_2c ( | - |
437 | &cp | - |
438 | , __r0, __r1) : (((const char *) ( | - |
439 | "," | - |
440 | ))[3] == '\0' ? __strsep_3c ( | - |
441 | &cp | - |
442 | , __r0, __r1, __r2) : __strsep_g ( | - |
443 | &cp | - |
444 | , | - |
445 | "," | - |
446 | )))) : __strsep_g ( | - |
447 | &cp | - |
448 | , | - |
449 | "," | - |
450 | )); }) | - |
451 | ), i++) { | - |
452 | for (j = 0; j < nproposalsTRUE | evaluated 2080 times by 1 test | FALSE | evaluated 160 times by 1 test |
; j++) { | 160-2080 |
453 | if ( | - |
454 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
455 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
456 | ) && __builtin_constant_p (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
457 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
458 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
459 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
460 | ), __s2_len = __builtin_strlen (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
461 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
462 | ), (!((size_t)(const void *)((TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
463 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
464 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
465 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
466 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
467 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
468 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
469 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
470 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
471 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
472 | , TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
473 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
474 | ) : (__builtin_constant_p (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
475 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
476 | ) && ((size_t)(const void *)((TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
477 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
478 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
479 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
480 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
481 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
482 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
483 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
484 | ) && ((size_t)(const void *)((TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
485 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
486 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
487 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
488 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
489 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
490 | , TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
491 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
492 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
493 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
494 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
495 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
496 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 0-1920 |
497 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
498 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 0-1920 |
499 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
500 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( p ))[3] - __s2[3]); TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 0-1920 |
501 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( p ))[3] - __s2[3]); | 0-1920 |
502 | ))[3] - __s2[3]);TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( p ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 0-1920 |
503 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
504 | ) && ((size_t)(const void *)((TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
505 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
506 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
507 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
508 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
509 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
510 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
511 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
512 | ) && ((size_t)(const void *)((TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
513 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
514 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
515 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
516 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
517 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
518 | , TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
519 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
520 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
521 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
522 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
523 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
524 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 0-1920 |
525 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
526 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 0-1920 |
527 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
528 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( sproposals[j] ))[3] - __s2[3]); TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 0-1920 |
529 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( sproposals[j] ))[3] - __s2[3]); | 0-1920 |
530 | ))[3] - __s2[3]);TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( sproposals[j] ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 0-1920 |
531 | pTRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
532 | , TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
533 | sproposals[j]TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
534 | )))); }) TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
| 160-1920 |
535 | == 0TRUE | evaluated 1920 times by 1 test | FALSE | evaluated 160 times by 1 test |
) { | 160-1920 |
536 | ret = xstrdup(p); | - |
537 | if (next != TRUE | never evaluated | FALSE | evaluated 1920 times by 1 test |
| 0-1920 |
538 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 1920 times by 1 test |
| 0-1920 |
539 | ) | - |
540 | * never executed: *next = (cp == ((void *)0) ) ? strlen(c) : (u_int)(cp - c); next = (TRUE | never evaluated | FALSE | never evaluated |
cp == TRUE | never evaluated | FALSE | never evaluated |
never executed: *next = (cp == ((void *)0) ) ? strlen(c) : (u_int)(cp - c); | 0 |
541 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
never executed: *next = (cp == ((void *)0) ) ? strlen(c) : (u_int)(cp - c); | 0 |
542 | )TRUE | never evaluated | FALSE | never evaluated |
?never executed: *next = (cp == ((void *)0) ) ? strlen(c) : (u_int)(cp - c); | 0 |
543 | strlen(c) : (u_int)(cp - c); never executed: *next = (cp == ((void *)0) ) ? strlen(c) : (u_int)(cp - c); | 0 |
544 | free(c); | - |
545 | free(s); | - |
546 | returnexecuted 1920 times by 1 test: return ret; ret;executed 1920 times by 1 test: return ret; | 1920 |
547 | } | - |
548 | }executed 160 times by 1 test: end of block | 160 |
549 | }executed 160 times by 1 test: end of block | 160 |
550 | if (next != TRUE | never evaluated | FALSE | evaluated 160 times by 1 test |
| 0-160 |
551 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 160 times by 1 test |
| 0-160 |
552 | ) | - |
553 | * never executed: *next = strlen(c); next = strlen(c);never executed: *next = strlen(c); | 0 |
554 | free(c); | - |
555 | free(s); | - |
556 | returnexecuted 160 times by 1 test: return ((void *)0) ; executed 160 times by 1 test: return ((void *)0) ; | 160 |
557 | ((void *)0)executed 160 times by 1 test: return ((void *)0) ; | 160 |
558 | ;executed 160 times by 1 test: return ((void *)0) ; | 160 |
559 | } | - |
560 | static char * | - |
561 | filter_list(const char *proposal, const char *filter, int blacklist) | - |
562 | { | - |
563 | size_t len = strlen(proposal) + 1; | - |
564 | char *fix_prop = malloc(len); | - |
565 | char *orig_prop = | - |
566 | (__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 10 times by 1 test |
| 0-10 |
567 | proposalTRUE | never evaluated | FALSE | evaluated 10 times by 1 test |
| 0-10 |
568 | )TRUE | never evaluated | FALSE | evaluated 10 times by 1 test |
&& ((TRUE | never evaluated | FALSE | never evaluated |
size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0-10 |
569 | proposalTRUE | never evaluated | FALSE | never evaluated |
| 0 |
570 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
571 | proposalTRUE | never evaluated | FALSE | never evaluated |
| 0 |
572 | ) == 1)TRUE | never evaluated | FALSE | never evaluated |
? (((constTRUE | never evaluated | FALSE | never evaluated |
char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
573 | proposalTRUE | never evaluated | FALSE | never evaluated |
| 0 |
574 | ))[0] == '\0'TRUE | never evaluated | FALSE | never evaluated |
? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len = strlen ( | 0 |
575 | proposal | - |
576 | ) + 1; char *__retval = (char *) malloc (__len); if (__retval != ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
) __retval = (char *) memcpy (__retval, never executed: __retval = (char *) memcpy (__retval, proposal , __len); | 0 |
577 | proposal never executed: __retval = (char *) memcpy (__retval, proposal , __len); | 0 |
578 | , __len); never executed: __retval = (char *) memcpy (__retval, proposal , __len); __retval; })) : __strdup ( | 0 |
579 | proposal | - |
580 | ))) | - |
581 | ; | - |
582 | char *cp, *tmp; | - |
583 | int r; | - |
584 | | - |
585 | if (fix_prop == TRUE | never evaluated | FALSE | evaluated 10 times by 1 test |
| 0-10 |
586 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 10 times by 1 test |
| 0-10 |
587 | || orig_prop == TRUE | never evaluated | FALSE | evaluated 10 times by 1 test |
| 0-10 |
588 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 10 times by 1 test |
| 0-10 |
589 | ) { | - |
590 | free(orig_prop); | - |
591 | free(fix_prop); | - |
592 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
593 | ((void *)0) never executed: return ((void *)0) ; | 0 |
594 | ; never executed: return ((void *)0) ; | 0 |
595 | } | - |
596 | | - |
597 | tmp = orig_prop; | - |
598 | *fix_prop = '\0'; | - |
599 | while ((TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
cp = TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
600 | __extension__ ({ char __r0, __r1, __r2; (__builtin_constant_p (TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
601 | ","TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
602 | ) && ((size_t)(const void *)((TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
603 | ","TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
604 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
605 | ","TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
606 | ) == 1) && (__r0 = ((const char *) (TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
607 | ","TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
608 | ))[0], ((const char *) (TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
609 | ","TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
610 | ))[0] != '\0') ? ((__r1 = ((const char *) (TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
611 | ","TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
612 | ))[1], ((const char *) (TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
613 | ","TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
614 | ))[1] == '\0') ? __strsep_1c (TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
615 | &tmpTRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
616 | , __r0) : ((__r2 = ((const char *) (TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
617 | ","TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
618 | ))[2], __r2 == '\0') ? __strsep_2c (TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
619 | &tmpTRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
620 | , __r0, __r1) : (((const char *) (TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
621 | ","TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
622 | ))[3] == '\0' ? __strsep_3c (TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
623 | &tmpTRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
624 | , __r0, __r1, __r2) : __strsep_g (TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
625 | &tmpTRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
626 | , TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
627 | ","TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
628 | )))) : __strsep_g (TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
629 | &tmpTRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
630 | , TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
631 | ","TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
632 | )); })TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
633 | ) != TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
634 | ((void *)0)TRUE | evaluated 28 times by 1 test | FALSE | evaluated 10 times by 1 test |
| 10-28 |
635 | ) { | - |
636 | r = match_pattern_list(cp, filter, 0); | - |
637 | if ((blacklistTRUE | evaluated 28 times by 1 test | FALSE | never evaluated |
&& r != 1TRUE | evaluated 14 times by 1 test | FALSE | evaluated 14 times by 1 test |
) || (!blacklistTRUE | never evaluated | FALSE | evaluated 14 times by 1 test |
&& r == 1TRUE | never evaluated | FALSE | never evaluated |
)) { | 0-28 |
638 | if (*TRUE | evaluated 5 times by 1 test | FALSE | evaluated 9 times by 1 test |
fix_prop != '\0'TRUE | evaluated 5 times by 1 test | FALSE | evaluated 9 times by 1 test |
) | 5-9 |
639 | strlcat(fix_prop, ",", len);executed 5 times by 1 test: strlcat(fix_prop, ",", len); | 5 |
640 | strlcat(fix_prop, cp, len); | - |
641 | }executed 14 times by 1 test: end of block | 14 |
642 | }executed 28 times by 1 test: end of block | 28 |
643 | free(orig_prop); | - |
644 | returnexecuted 10 times by 1 test: return fix_prop; fix_prop;executed 10 times by 1 test: return fix_prop; | 10 |
645 | } | - |
646 | | - |
647 | | - |
648 | | - |
649 | | - |
650 | | - |
651 | char * | - |
652 | match_filter_blacklist(const char *proposal, const char *filter) | - |
653 | { | - |
654 | returnexecuted 10 times by 1 test: return filter_list(proposal, filter, 1); filter_list(proposal, filter, 1);executed 10 times by 1 test: return filter_list(proposal, filter, 1); | 10 |
655 | } | - |
656 | | - |
657 | | - |
658 | | - |
659 | | - |
660 | | - |
661 | char * | - |
662 | match_filter_whitelist(const char *proposal, const char *filter) | - |
663 | { | - |
664 | return never executed: return filter_list(proposal, filter, 0); filter_list(proposal, filter, 0);never executed: return filter_list(proposal, filter, 0); | 0 |
665 | } | - |
| | |