OpenCoverage

ctype.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/ctype.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8static const unsigned short ctype_char_map[128] = {-
9 0x40,-
10 0x40,-
11 0x40,-
12 0x40,-
13 0x40,-
14 0x40,-
15 0x40,-
16 0x40,-
17 0x40,-
18 0x20 | 0x40 | 0x8,-
19 0x40 | 0x8,-
20 0x40 | 0x8,-
21 0x40 | 0x8,-
22 0x40 | 0x8,-
23 0x40,-
24 0x40,-
25 0x40,-
26 0x40,-
27 0x40,-
28 0x40,-
29 0x40,-
30 0x40,-
31 0x40,-
32 0x40,-
33 0x40,-
34 0x40,-
35 0x40,-
36 0x40,-
37 0x40,-
38 0x40,-
39 0x40,-
40 0x40,-
41 0x20 | 0x100 | 0x8-
42 | 0x800,-
43 0x80 | 0x100 | 0x200,-
44 0x80 | 0x100 | 0x200,-
45 0x80 | 0x100 | 0x200,-
46 0x80 | 0x100 | 0x200,-
47 0x80 | 0x100 | 0x200,-
48 0x80 | 0x100 | 0x200,-
49 0x80 | 0x100 | 0x200-
50 | 0x800,-
51 0x80 | 0x100 | 0x200-
52 | 0x800,-
53 0x80 | 0x100 | 0x200-
54 | 0x800,-
55 0x80 | 0x100 | 0x200,-
56 0x80 | 0x100 | 0x200-
57 | 0x400 | 0x800,-
58 0x80 | 0x100 | 0x200-
59 | 0x800,-
60 0x80 | 0x100 | 0x200-
61 | 0x800,-
62 0x80 | 0x100 | 0x200-
63 | 0x800,-
64 0x80 | 0x100 | 0x200-
65 | 0x400 | 0x800,-
66 0x4 | 0x80 | 0x100-
67 | 0x10 | 0x400 | 0x800,-
68 0x4 | 0x80 | 0x100-
69 | 0x10 | 0x400 | 0x800,-
70 0x4 | 0x80 | 0x100-
71 | 0x10 | 0x400 | 0x800,-
72 0x4 | 0x80 | 0x100-
73 | 0x10 | 0x400 | 0x800,-
74 0x4 | 0x80 | 0x100-
75 | 0x10 | 0x400 | 0x800,-
76 0x4 | 0x80 | 0x100-
77 | 0x10 | 0x400 | 0x800,-
78 0x4 | 0x80 | 0x100-
79 | 0x10 | 0x400 | 0x800,-
80 0x4 | 0x80 | 0x100-
81 | 0x10 | 0x400 | 0x800,-
82 0x4 | 0x80 | 0x100-
83 | 0x10 | 0x400 | 0x800,-
84 0x4 | 0x80 | 0x100-
85 | 0x10 | 0x400 | 0x800,-
86 0x80 | 0x100 | 0x200-
87 | 0x800,-
88 0x80 | 0x100 | 0x200,-
89 0x80 | 0x100 | 0x200,-
90 0x80 | 0x100 | 0x200-
91 | 0x400 | 0x800,-
92 0x80 | 0x100 | 0x200,-
93 0x80 | 0x100 | 0x200-
94 | 0x800,-
95 0x80 | 0x100 | 0x200,-
96 0x80 | 0x100 | 0x2-
97 | 0x10 | 0x400 | 0x800,-
98 0x80 | 0x100 | 0x2-
99 | 0x10 | 0x400 | 0x800,-
100 0x80 | 0x100 | 0x2-
101 | 0x10 | 0x400 | 0x800,-
102 0x80 | 0x100 | 0x2-
103 | 0x10 | 0x400 | 0x800,-
104 0x80 | 0x100 | 0x2-
105 | 0x10 | 0x400 | 0x800,-
106 0x80 | 0x100 | 0x2-
107 | 0x10 | 0x400 | 0x800,-
108 0x80 | 0x100 | 0x2-
109 | 0x400 | 0x800,-
110 0x80 | 0x100 | 0x2-
111 | 0x400 | 0x800,-
112 0x80 | 0x100 | 0x2-
113 | 0x400 | 0x800,-
114 0x80 | 0x100 | 0x2-
115 | 0x400 | 0x800,-
116 0x80 | 0x100 | 0x2-
117 | 0x400 | 0x800,-
118 0x80 | 0x100 | 0x2-
119 | 0x400 | 0x800,-
120 0x80 | 0x100 | 0x2-
121 | 0x400 | 0x800,-
122 0x80 | 0x100 | 0x2-
123 | 0x400 | 0x800,-
124 0x80 | 0x100 | 0x2-
125 | 0x400 | 0x800,-
126 0x80 | 0x100 | 0x2-
127 | 0x400 | 0x800,-
128 0x80 | 0x100 | 0x2-
129 | 0x400 | 0x800,-
130 0x80 | 0x100 | 0x2-
131 | 0x400 | 0x800,-
132 0x80 | 0x100 | 0x2-
133 | 0x400 | 0x800,-
134 0x80 | 0x100 | 0x2-
135 | 0x400 | 0x800,-
136 0x80 | 0x100 | 0x2-
137 | 0x400 | 0x800,-
138 0x80 | 0x100 | 0x2-
139 | 0x400 | 0x800,-
140 0x80 | 0x100 | 0x2-
141 | 0x400 | 0x800,-
142 0x80 | 0x100 | 0x2-
143 | 0x400 | 0x800,-
144 0x80 | 0x100 | 0x2-
145 | 0x400 | 0x800,-
146 0x80 | 0x100 | 0x2-
147 | 0x400 | 0x800,-
148 0x80 | 0x100 | 0x200,-
149 0x80 | 0x100 | 0x200,-
150 0x80 | 0x100 | 0x200,-
151 0x80 | 0x100 | 0x200,-
152 0x80 | 0x100 | 0x200,-
153 0x80 | 0x100 | 0x200,-
154 0x80 | 0x1 | 0x100-
155 | 0x10 | 0x400 | 0x800,-
156 0x80 | 0x1 | 0x100-
157 | 0x10 | 0x400 | 0x800,-
158 0x80 | 0x1 | 0x100-
159 | 0x10 | 0x400 | 0x800,-
160 0x80 | 0x1 | 0x100-
161 | 0x10 | 0x400 | 0x800,-
162 0x80 | 0x1 | 0x100-
163 | 0x10 | 0x400 | 0x800,-
164 0x80 | 0x1 | 0x100-
165 | 0x10 | 0x400 | 0x800,-
166 0x80 | 0x1 | 0x100-
167 | 0x400 | 0x800,-
168 0x80 | 0x1 | 0x100-
169 | 0x400 | 0x800,-
170 0x80 | 0x1 | 0x100-
171 | 0x400 | 0x800,-
172 0x80 | 0x1 | 0x100-
173 | 0x400 | 0x800,-
174 0x80 | 0x1 | 0x100-
175 | 0x400 | 0x800,-
176 0x80 | 0x1 | 0x100-
177 | 0x400 | 0x800,-
178 0x80 | 0x1 | 0x100-
179 | 0x400 | 0x800,-
180 0x80 | 0x1 | 0x100-
181 | 0x400 | 0x800,-
182 0x80 | 0x1 | 0x100-
183 | 0x400 | 0x800,-
184 0x80 | 0x1 | 0x100-
185 | 0x400 | 0x800,-
186 0x80 | 0x1 | 0x100-
187 | 0x400 | 0x800,-
188 0x80 | 0x1 | 0x100-
189 | 0x400 | 0x800,-
190 0x80 | 0x1 | 0x100-
191 | 0x400 | 0x800,-
192 0x80 | 0x1 | 0x100-
193 | 0x400 | 0x800,-
194 0x80 | 0x1 | 0x100-
195 | 0x400 | 0x800,-
196 0x80 | 0x1 | 0x100-
197 | 0x400 | 0x800,-
198 0x80 | 0x1 | 0x100-
199 | 0x400 | 0x800,-
200 0x80 | 0x1 | 0x100-
201 | 0x400 | 0x800,-
202 0x80 | 0x1 | 0x100-
203 | 0x400 | 0x800,-
204 0x80 | 0x1 | 0x100-
205 | 0x400 | 0x800,-
206 0x80 | 0x100 | 0x200,-
207 0x80 | 0x100 | 0x200,-
208 0x80 | 0x100 | 0x200,-
209 0x80 | 0x100 | 0x200,-
210 0x40-
211};-
212int ossl_ctype_check(int c, unsigned int mask)-
213{-
214 const int max = sizeof(ctype_char_map) / sizeof(*ctype_char_map);-
215 const int a = (c);-
216-
217 return
executed 41567565 times by 12 tests: return a >= 0 && a < max && (ctype_char_map[a] & mask) != 0;
Executed by:
  • asn1_internal_test
  • chacha_internal_test
  • ctype_internal_test
  • curve448_internal_test
  • libcrypto.so.1.1
  • modes_internal_test
  • poly1305_internal_test
  • rdrand_sanitytest
  • siphash_internal_test
  • sm2_internal_test
  • sm4_internal_test
  • x509_internal_test
a >= 0
a >= 0Description
TRUEevaluated 41566856 times by 12 tests
Evaluated by:
  • asn1_internal_test
  • chacha_internal_test
  • ctype_internal_test
  • curve448_internal_test
  • libcrypto.so.1.1
  • modes_internal_test
  • poly1305_internal_test
  • rdrand_sanitytest
  • siphash_internal_test
  • sm2_internal_test
  • sm4_internal_test
  • x509_internal_test
FALSEevaluated 709 times by 2 tests
Evaluated by:
  • ctype_internal_test
  • libcrypto.so.1.1
&& a < max
a < maxDescription
TRUEevaluated 41558016 times by 12 tests
Evaluated by:
  • asn1_internal_test
  • chacha_internal_test
  • ctype_internal_test
  • curve448_internal_test
  • libcrypto.so.1.1
  • modes_internal_test
  • poly1305_internal_test
  • rdrand_sanitytest
  • siphash_internal_test
  • sm2_internal_test
  • sm4_internal_test
  • x509_internal_test
FALSEevaluated 8840 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(ctype_char_ma...] & mask) != 0Description
TRUEevaluated 15647537 times by 3 tests
Evaluated by:
  • ctype_internal_test
  • libcrypto.so.1.1
  • sm2_internal_test
FALSEevaluated 25910479 times by 12 tests
Evaluated by:
  • asn1_internal_test
  • chacha_internal_test
  • ctype_internal_test
  • curve448_internal_test
  • libcrypto.so.1.1
  • modes_internal_test
  • poly1305_internal_test
  • rdrand_sanitytest
  • siphash_internal_test
  • sm2_internal_test
  • sm4_internal_test
  • x509_internal_test
ctype_char_map[a] & mask) != 0
(ctype_char_ma...] & mask) != 0Description
TRUEevaluated 15647537 times by 3 tests
Evaluated by:
  • ctype_internal_test
  • libcrypto.so.1.1
  • sm2_internal_test
FALSEevaluated 25910479 times by 12 tests
Evaluated by:
  • asn1_internal_test
  • chacha_internal_test
  • ctype_internal_test
  • curve448_internal_test
  • libcrypto.so.1.1
  • modes_internal_test
  • poly1305_internal_test
  • rdrand_sanitytest
  • siphash_internal_test
  • sm2_internal_test
  • sm4_internal_test
  • x509_internal_test
;
executed 41567565 times by 12 tests: return a >= 0 && a < max && (ctype_char_map[a] & mask) != 0;
Executed by:
  • asn1_internal_test
  • chacha_internal_test
  • ctype_internal_test
  • curve448_internal_test
  • libcrypto.so.1.1
  • modes_internal_test
  • poly1305_internal_test
  • rdrand_sanitytest
  • siphash_internal_test
  • sm2_internal_test
  • sm4_internal_test
  • x509_internal_test
709-41567565
218}-
219-
220-
221-
222-
223static const int case_change = 0x20;-
224-
225-
226int ossl_tolower(int c)-
227{-
228 return
executed 16711407 times by 2 tests: return (ossl_ctype_check((c), 0x2)) ? c ^ case_change : c;
Executed by:
  • ctype_internal_test
  • libcrypto.so.1.1
(
(ossl_ctype_check((c), 0x2))Description
TRUEevaluated 3723838 times by 2 tests
Evaluated by:
  • ctype_internal_test
  • libcrypto.so.1.1
FALSEevaluated 12987569 times by 2 tests
Evaluated by:
  • ctype_internal_test
  • libcrypto.so.1.1
ossl_ctype_check((c), 0x2))
(ossl_ctype_check((c), 0x2))Description
TRUEevaluated 3723838 times by 2 tests
Evaluated by:
  • ctype_internal_test
  • libcrypto.so.1.1
FALSEevaluated 12987569 times by 2 tests
Evaluated by:
  • ctype_internal_test
  • libcrypto.so.1.1
? c ^ case_change : c;
executed 16711407 times by 2 tests: return (ossl_ctype_check((c), 0x2)) ? c ^ case_change : c;
Executed by:
  • ctype_internal_test
  • libcrypto.so.1.1
3723838-16711407
229}-
230-
231int ossl_toupper(int c)-
232{-
233 return
executed 16 times by 1 test: return (ossl_ctype_check((c), 0x1)) ? c ^ case_change : c;
Executed by:
  • ctype_internal_test
(
(ossl_ctype_check((c), 0x1))Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • ctype_internal_test
FALSEevaluated 13 times by 1 test
Evaluated by:
  • ctype_internal_test
ossl_ctype_check((c), 0x1))
(ossl_ctype_check((c), 0x1))Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • ctype_internal_test
FALSEevaluated 13 times by 1 test
Evaluated by:
  • ctype_internal_test
? c ^ case_change : c;
executed 16 times by 1 test: return (ossl_ctype_check((c), 0x1)) ? c ^ case_change : c;
Executed by:
  • ctype_internal_test
3-16
234}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2