OpenCoverage

a_mbstr.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/asn1/a_mbstr.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2static int traverse_string(const unsigned char *p, int len, int inform,-
3 int (*rfunc) (unsigned long value, void *in),-
4 void *arg);-
5static int in_utf8(unsigned long value, void *arg);-
6static int out_utf8(unsigned long value, void *arg);-
7static int type_str(unsigned long value, void *arg);-
8static int cpy_asc(unsigned long value, void *arg);-
9static int cpy_bmp(unsigned long value, void *arg);-
10static int cpy_univ(unsigned long value, void *arg);-
11static int cpy_utf8(unsigned long value, void *arg);-
12int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,-
13 int inform, unsigned long mask)-
14{-
15 return
executed 154154 times by 1 test: return ASN1_mbstring_ncopy(out, in, len, inform, mask, 0, 0);
Executed by:
  • libcrypto.so.1.1
ASN1_mbstring_ncopy(out, in, len, inform, mask, 0, 0);
executed 154154 times by 1 test: return ASN1_mbstring_ncopy(out, in, len, inform, mask, 0, 0);
Executed by:
  • libcrypto.so.1.1
154154
16}-
17-
18int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,-
19 int inform, unsigned long mask,-
20 long minsize, long maxsize)-
21{-
22 int str_type;-
23 int ret;-
24 char free_out;-
25 int outform, outlen = 0;-
26 ASN1_STRING *dest;-
27 unsigned char *p;-
28 int nchar;-
29 char strbuf[32];-
30 int (*cpyfunc) (unsigned long, void *) = -
31 ((void *)0)-
32 ;-
33 if (len == -1
len == -1Description
TRUEevaluated 765 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 154154 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
765-154154
34 len = strlen((const char *)in);
executed 765 times by 1 test: len = strlen((const char *)in);
Executed by:
  • libcrypto.so.1.1
765
35 if (!mask
!maskDescription
TRUEnever evaluated
FALSEevaluated 154919 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-154919
36 mask = (0x0002|0x0004|0x0800|0x2000);
never executed: mask = (0x0002|0x0004|0x0800|0x2000);
0
37-
38-
39 switch (inform) {-
40-
41 case
executed 7094 times by 1 test: case (0x1000|2):
Executed by:
  • libcrypto.so.1.1
(0x1000|2):
executed 7094 times by 1 test: case (0x1000|2):
Executed by:
  • libcrypto.so.1.1
7094
42 if (len & 1
len & 1Description
TRUEnever evaluated
FALSEevaluated 7094 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-7094
43 ERR_put_error(13,(122),(129),__FILE__,65)-
44 ;-
45 return
never executed: return -1;
-1;
never executed: return -1;
0
46 }-
47 nchar = len >> 1;-
48 break;
executed 7094 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
7094
49-
50 case
executed 7520 times by 1 test: case (0x1000|4):
Executed by:
  • libcrypto.so.1.1
(0x1000|4):
executed 7520 times by 1 test: case (0x1000|4):
Executed by:
  • libcrypto.so.1.1
7520
51 if (len & 3
len & 3Description
TRUEnever evaluated
FALSEevaluated 7520 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-7520
52 ERR_put_error(13,(122),(133),__FILE__,74)-
53 ;-
54 return
never executed: return -1;
-1;
never executed: return -1;
0
55 }-
56 nchar = len >> 2;-
57 break;
executed 7520 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
7520
58-
59 case
executed 85293 times by 1 test: case (0x1000):
Executed by:
  • libcrypto.so.1.1
(0x1000):
executed 85293 times by 1 test: case (0x1000):
Executed by:
  • libcrypto.so.1.1
85293
60 nchar = 0;-
61-
62 ret = traverse_string(in, len, (0x1000), in_utf8, &nchar);-
63 if (ret < 0
ret < 0Description
TRUEevaluated 4656 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 80637 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
4656-80637
64 ERR_put_error(13,(122),(134),__FILE__,85);-
65 return
executed 4656 times by 1 test: return -1;
Executed by:
  • libcrypto.so.1.1
-1;
executed 4656 times by 1 test: return -1;
Executed by:
  • libcrypto.so.1.1
4656
66 }-
67 break;
executed 80637 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
80637
68-
69 case
executed 55012 times by 1 test: case (0x1000|1):
Executed by:
  • libcrypto.so.1.1
(0x1000|1):
executed 55012 times by 1 test: case (0x1000|1):
Executed by:
  • libcrypto.so.1.1
55012
70 nchar = len;-
71 break;
executed 55012 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
55012
72-
73 default
never executed: default:
:
never executed: default:
0
74 ERR_put_error(13,(122),(160),__FILE__,95);-
75 return
never executed: return -1;
-1;
never executed: return -1;
0
76 }-
77-
78 if ((
(minsize > 0)Description
TRUEevaluated 765 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 149498 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
minsize > 0)
(minsize > 0)Description
TRUEevaluated 765 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 149498 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(nchar < minsize)Description
TRUEnever evaluated
FALSEevaluated 765 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
nchar < minsize)
(nchar < minsize)Description
TRUEnever evaluated
FALSEevaluated 765 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-149498
79 ERR_put_error(13,(122),(152),__FILE__,100);-
80 BIO_snprintf(strbuf, sizeof(strbuf), "%ld", minsize);-
81 ERR_add_error_data(2, "minsize=", strbuf);-
82 return
never executed: return -1;
-1;
never executed: return -1;
0
83 }-
84-
85 if ((
(maxsize > 0)Description
TRUEevaluated 765 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 149498 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
maxsize > 0)
(maxsize > 0)Description
TRUEevaluated 765 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 149498 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(nchar > maxsize)Description
TRUEnever evaluated
FALSEevaluated 765 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
nchar > maxsize)
(nchar > maxsize)Description
TRUEnever evaluated
FALSEevaluated 765 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-149498
86 ERR_put_error(13,(122),(151),__FILE__,107);-
87 BIO_snprintf(strbuf, sizeof(strbuf), "%ld", maxsize);-
88 ERR_add_error_data(2, "maxsize=", strbuf);-
89 return
never executed: return -1;
-1;
never executed: return -1;
0
90 }-
91-
92-
93 if (traverse_string(in, len, inform, type_str, &mask) < 0
traverse_strin...tr, &mask) < 0Description
TRUEnever evaluated
FALSEevaluated 150263 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-150263
94 ERR_put_error(13,(122),(124),__FILE__,115);-
95 return
never executed: return -1;
-1;
never executed: return -1;
0
96 }-
97-
98-
99 outform = (0x1000|1);-
100 if (mask & 0x0001
mask & 0x0001Description
TRUEnever evaluated
FALSEevaluated 150263 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-150263
101 str_type = 18;
never executed: str_type = 18;
0
102 else if (mask & 0x0002
mask & 0x0002Description
TRUEevaluated 11 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 150252 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
11-150252
103 str_type = 19;
executed 11 times by 1 test: str_type = 19;
Executed by:
  • libcrypto.so.1.1
11
104 else if (mask & 0x0010
mask & 0x0010Description
TRUEevaluated 359 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 149893 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
359-149893
105 str_type = 22;
executed 359 times by 1 test: str_type = 22;
Executed by:
  • libcrypto.so.1.1
359
106 else if (mask & 0x0004
mask & 0x0004Description
TRUEnever evaluated
FALSEevaluated 149893 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-149893
107 str_type = 20;
never executed: str_type = 20;
0
108 else if (mask & 0x0800
mask & 0x0800Description
TRUEnever evaluated
FALSEevaluated 149893 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-149893
109 str_type = 30;-
110 outform = (0x1000|2);-
111 }
never executed: end of block
else if (mask & 0x0100
mask & 0x0100Description
TRUEnever evaluated
FALSEevaluated 149893 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-149893
112 str_type = 28;-
113 outform = (0x1000|4);-
114 }
never executed: end of block
else {
0
115 str_type = 12;-
116 outform = (0x1000);-
117 }
executed 149893 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
149893
118 if (!out
!outDescription
TRUEnever evaluated
FALSEevaluated 150263 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-150263
119 return
never executed: return str_type;
str_type;
never executed: return str_type;
0
120 if (*
*outDescription
TRUEevaluated 150263 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
out
*outDescription
TRUEevaluated 150263 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-150263
121 free_out = 0;-
122 dest = *out;-
123 CRYPTO_free(dest->data, __FILE__, 144);-
124 dest->data = -
125 ((void *)0)-
126 ;-
127 dest->length = 0;-
128 dest->type = str_type;-
129 }
executed 150263 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
150263
130 free_out = 1;-
131 dest = ASN1_STRING_type_new(str_type);-
132 if (dest ==
dest == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
133 ((void *)0)
dest == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
134 ) {-
135 ERR_put_error(13,(122),((1|64)),__FILE__,152);-
136 return
never executed: return -1;
-1;
never executed: return -1;
0
137 }-
138 *out = dest;-
139 }
never executed: end of block
0
140-
141 if (inform == outform
inform == outformDescription
TRUEevaluated 81007 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 69256 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
69256-81007
142 if (!ASN1_STRING_set(dest, in, len)
!ASN1_STRING_s...dest, in, len)Description
TRUEnever evaluated
FALSEevaluated 81007 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-81007
143 ERR_put_error(13,(122),((1|64)),__FILE__,160);-
144 return
never executed: return -1;
-1;
never executed: return -1;
0
145 }-
146 return
executed 81007 times by 1 test: return str_type;
Executed by:
  • libcrypto.so.1.1
str_type;
executed 81007 times by 1 test: return str_type;
Executed by:
  • libcrypto.so.1.1
81007
147 }-
148-
149-
150 switch (outform) {-
151 case
never executed: case (0x1000|1):
(0x1000|1):
never executed: case (0x1000|1):
0
152 outlen = nchar;-
153 cpyfunc = cpy_asc;-
154 break;
never executed: break;
0
155-
156 case
never executed: case (0x1000|2):
(0x1000|2):
never executed: case (0x1000|2):
0
157 outlen = nchar << 1;-
158 cpyfunc = cpy_bmp;-
159 break;
never executed: break;
0
160-
161 case
never executed: case (0x1000|4):
(0x1000|4):
never executed: case (0x1000|4):
0
162 outlen = nchar << 2;-
163 cpyfunc = cpy_univ;-
164 break;
never executed: break;
0
165-
166 case
executed 69256 times by 1 test: case (0x1000):
Executed by:
  • libcrypto.so.1.1
(0x1000):
executed 69256 times by 1 test: case (0x1000):
Executed by:
  • libcrypto.so.1.1
69256
167 outlen = 0;-
168 traverse_string(in, len, inform, out_utf8, &outlen);-
169 cpyfunc = cpy_utf8;-
170 break;
executed 69256 times by 1 test: break;
Executed by:
  • libcrypto.so.1.1
69256
171 }-
172 if ((
(p = CRYPTO_ma...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 69256 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
p = CRYPTO_malloc(outlen + 1, __FILE__, 189)) ==
(p = CRYPTO_ma...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 69256 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-69256
173 ((void *)0)
(p = CRYPTO_ma...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 69256 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-69256
174 ) {-
175 if (free_out
free_outDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
176 ASN1_STRING_free(dest);
never executed: ASN1_STRING_free(dest);
0
177 ERR_put_error(13,(122),((1|64)),__FILE__,192);-
178 return
never executed: return -1;
-1;
never executed: return -1;
0
179 }-
180 dest->length = outlen;-
181 dest->data = p;-
182 p[outlen] = 0;-
183 traverse_string(in, len, inform, cpyfunc, &p);-
184 return
executed 69256 times by 1 test: return str_type;
Executed by:
  • libcrypto.so.1.1
str_type;
executed 69256 times by 1 test: return str_type;
Executed by:
  • libcrypto.so.1.1
69256
185}-
186-
187-
188-
189-
190-
191-
192static int traverse_string(const unsigned char *p, int len, int inform,-
193 int (*rfunc) (unsigned long value, void *in),-
194 void *arg)-
195{-
196 unsigned long value;-
197 int ret;-
198 while (len
lenDescription
TRUEevaluated 3369336 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 369412 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
369412-3369336
199 if (inform == (0x1000|1)
inform == (0x1000|1)Description
TRUEevaluated 1638770 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1730566 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1638770-1730566
200 value = *p++;-
201 len--;-
202 }
executed 1638770 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else if (inform == (0x1000|2)
inform == (0x1000|2)Description
TRUEevaluated 54267 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1676299 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
54267-1676299
203 value = *p++ << 8;-
204 value |= *p++;-
205 len -= 2;-
206 }
executed 54267 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else if (inform == (0x1000|4)
inform == (0x1000|4)Description
TRUEevaluated 22413 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1653886 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
22413-1653886
207 value = ((unsigned long)*p++) << 24;-
208 value |= ((unsigned long)*p++) << 16;-
209 value |= *p++ << 8;-
210 value |= *p++;-
211 len -= 4;-
212 }
executed 22413 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
22413
213 ret = UTF8_getc(p, len, &value);-
214 if (ret < 0
ret < 0Description
TRUEevaluated 4656 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1649230 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
4656-1649230
215 return
executed 4656 times by 1 test: return -1;
Executed by:
  • libcrypto.so.1.1
-1;
executed 4656 times by 1 test: return -1;
Executed by:
  • libcrypto.so.1.1
4656
216 len -= ret;-
217 p += ret;-
218 }
executed 1649230 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1649230
219 if (rfunc
rfuncDescription
TRUEevaluated 3364680 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-3364680
220 ret = rfunc(value, arg);-
221 if (ret <= 0
ret <= 0Description
TRUEnever evaluated
FALSEevaluated 3364680 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-3364680
222 return
never executed: return ret;
ret;
never executed: return ret;
0
223 }
executed 3364680 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3364680
224 }
executed 3364680 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3364680
225 return
executed 369412 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 369412 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
369412
226}-
227-
228-
229-
230-
231-
232static int in_utf8(unsigned long value, void *arg)-
233{-
234 int *nchar;-
235 nchar = arg;-
236 (*nchar)++;-
237 return
executed 833749 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 833749 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
833749
238}-
239-
240-
241-
242static int out_utf8(unsigned long value, void *arg)-
243{-
244 int *outlen;-
245 outlen = arg;-
246 *outlen += UTF8_putc(-
247 ((void *)0)-
248 , -1, value);-
249 return
executed 570249 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 570249 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
570249
250}-
251-
252-
253-
254-
255-
256-
257static int type_str(unsigned long value, void *arg)-
258{-
259 unsigned long types = *((unsigned long *)arg);-
260 const int native = value > 0x7fffffff
value > 0x7fffffffDescription
TRUEevaluated 1460 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1388973 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
? 0x7fffffff : (value);
1460-1388973
261-
262 if ((
(types & 0x0001)Description
TRUEnever evaluated
FALSEevaluated 1390433 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
types & 0x0001)
(types & 0x0001)Description
TRUEnever evaluated
FALSEevaluated 1390433 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !((
(ossl_ctype_ch...native), 0x4))Description
TRUEnever evaluated
FALSEnever evaluated
ossl_ctype_check((native), 0x4))
(ossl_ctype_ch...native), 0x4))Description
TRUEnever evaluated
FALSEnever evaluated
0-1390433
263 || native == ' '
native == ' 'Description
TRUEnever evaluated
FALSEnever evaluated
))
0
264 types &= ~0x0001;
never executed: types &= ~0x0001;
0
265 if ((
(types & 0x0002)Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1390411 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
types & 0x0002)
(types & 0x0002)Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1390411 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !(ossl_ctype_check((native), 0x800))
!(ossl_ctype_c...tive), 0x800))Description
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1390411
266 types &= ~0x0002;
never executed: types &= ~0x0002;
0
267 if ((
(types & 0x0010)Description
TRUEevaluated 4681 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1385752 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
types & 0x0010)
(types & 0x0010)Description
TRUEevaluated 4681 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1385752 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& !(((native) & ~127) == 0)
!(((native) & ~127) == 0)Description
TRUEnever evaluated
FALSEevaluated 4681 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1385752
268 types &= ~0x0010;
never executed: types &= ~0x0010;
0
269 if ((
(types & 0x0004)Description
TRUEnever evaluated
FALSEevaluated 1390433 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
types & 0x0004)
(types & 0x0004)Description
TRUEnever evaluated
FALSEevaluated 1390433 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(value > 0xff)Description
TRUEnever evaluated
FALSEnever evaluated
value > 0xff)
(value > 0xff)Description
TRUEnever evaluated
FALSEnever evaluated
)
0-1390433
270 types &= ~0x0004;
never executed: types &= ~0x0004;
0
271 if ((
(types & 0x0800)Description
TRUEnever evaluated
FALSEevaluated 1390433 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
types & 0x0800)
(types & 0x0800)Description
TRUEnever evaluated
FALSEevaluated 1390433 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(value > 0xffff)Description
TRUEnever evaluated
FALSEnever evaluated
value > 0xffff)
(value > 0xffff)Description
TRUEnever evaluated
FALSEnever evaluated
)
0-1390433
272 types &= ~0x0800;
never executed: types &= ~0x0800;
0
273 if (!types
!typesDescription
TRUEnever evaluated
FALSEevaluated 1390433 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1390433
274 return
never executed: return -1;
-1;
never executed: return -1;
0
275 *((unsigned long *)arg) = types;-
276 return
executed 1390433 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 1390433 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1390433
277}-
278-
279-
280-
281static int cpy_asc(unsigned long value, void *arg)-
282{-
283 unsigned char **p, *q;-
284 p = arg;-
285 q = *p;-
286 *q = (unsigned char)value;-
287 (*p)++;-
288 return
never executed: return 1;
1;
never executed: return 1;
0
289}-
290-
291-
292-
293static int cpy_bmp(unsigned long value, void *arg)-
294{-
295 unsigned char **p, *q;-
296 p = arg;-
297 q = *p;-
298 *q++ = (unsigned char)((value >> 8) & 0xff);-
299 *q = (unsigned char)(value & 0xff);-
300 *p += 2;-
301 return
never executed: return 1;
1;
never executed: return 1;
0
302}-
303-
304-
305-
306static int cpy_univ(unsigned long value, void *arg)-
307{-
308 unsigned char **p, *q;-
309 p = arg;-
310 q = *p;-
311 *q++ = (unsigned char)((value >> 24) & 0xff);-
312 *q++ = (unsigned char)((value >> 16) & 0xff);-
313 *q++ = (unsigned char)((value >> 8) & 0xff);-
314 *q = (unsigned char)(value & 0xff);-
315 *p += 4;-
316 return
never executed: return 1;
1;
never executed: return 1;
0
317}-
318-
319-
320-
321static int cpy_utf8(unsigned long value, void *arg)-
322{-
323 unsigned char **p;-
324 int ret;-
325 p = arg;-
326-
327 ret = UTF8_putc(*p, 0xff, value);-
328 *p += ret;-
329 return
executed 570249 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 570249 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
570249
330}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2