Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/asn1/a_strex.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||
4 | static int send_bio_chars(void *arg, const void *buf, int len) | - | ||||||||||||||||||||||||
5 | { | - | ||||||||||||||||||||||||
6 | if (!arg
| 139865-235228 | ||||||||||||||||||||||||
7 | return executed 139865 times by 1 test: 1;return 1; Executed by:
executed 139865 times by 1 test: return 1; Executed by:
| 139865 | ||||||||||||||||||||||||
8 | if (BIO_write(arg, buf, len) != len
| 0-235228 | ||||||||||||||||||||||||
9 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||
10 | return executed 235228 times by 1 test: 1;return 1; Executed by:
executed 235228 times by 1 test: return 1; Executed by:
| 235228 | ||||||||||||||||||||||||
11 | } | - | ||||||||||||||||||||||||
12 | - | |||||||||||||||||||||||||
13 | - | |||||||||||||||||||||||||
14 | static int send_fp_chars(void *arg, const void *buf, int len) | - | ||||||||||||||||||||||||
15 | { | - | ||||||||||||||||||||||||
16 | if (!arg
| 0 | ||||||||||||||||||||||||
17 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||
18 | if (fwrite(buf, 1, len, arg) != (unsigned int)len
| 0 | ||||||||||||||||||||||||
19 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||
20 | return never executed: 1;return 1; never executed: return 1; | 0 | ||||||||||||||||||||||||
21 | } | - | ||||||||||||||||||||||||
22 | - | |||||||||||||||||||||||||
23 | - | |||||||||||||||||||||||||
24 | typedef int char_io (void *arg, const void *buf, int len); | - | ||||||||||||||||||||||||
25 | - | |||||||||||||||||||||||||
26 | - | |||||||||||||||||||||||||
27 | - | |||||||||||||||||||||||||
28 | - | |||||||||||||||||||||||||
29 | - | |||||||||||||||||||||||||
30 | - | |||||||||||||||||||||||||
31 | - | |||||||||||||||||||||||||
32 | static int do_esc_char(unsigned long c, unsigned short flags, char *do_quotes, | - | ||||||||||||||||||||||||
33 | char_io *io_ch, void *arg) | - | ||||||||||||||||||||||||
34 | { | - | ||||||||||||||||||||||||
35 | unsigned short chflgs; | - | ||||||||||||||||||||||||
36 | unsigned char chtmp; | - | ||||||||||||||||||||||||
37 | char tmphex[(sizeof(long)*2) + 3]; | - | ||||||||||||||||||||||||
38 | - | |||||||||||||||||||||||||
39 | if (c > 0xffffffffL
| 0-274774 | ||||||||||||||||||||||||
40 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
41 | if (c > 0xffff
| 209-274565 | ||||||||||||||||||||||||
42 | BIO_snprintf(tmphex, sizeof(tmphex), "\\W%08lX", c); | - | ||||||||||||||||||||||||
43 | if (!io_ch(arg, tmphex, 10)
| 0-209 | ||||||||||||||||||||||||
44 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
45 | return executed 209 times by 1 test: 10;return 10; Executed by:
executed 209 times by 1 test: return 10; Executed by:
| 209 | ||||||||||||||||||||||||
46 | } | - | ||||||||||||||||||||||||
47 | if (c > 0xff
| 500-274065 | ||||||||||||||||||||||||
48 | BIO_snprintf(tmphex, sizeof(tmphex), "\\U%04lX", c); | - | ||||||||||||||||||||||||
49 | if (!io_ch(arg, tmphex, 6)
| 0-500 | ||||||||||||||||||||||||
50 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
51 | return executed 500 times by 1 test: 6;return 6; Executed by:
executed 500 times by 1 test: return 6; Executed by:
| 500 | ||||||||||||||||||||||||
52 | } | - | ||||||||||||||||||||||||
53 | chtmp = (unsigned char)c; | - | ||||||||||||||||||||||||
54 | if (chtmp > 0x7f
| 122020-152045 | ||||||||||||||||||||||||
55 | chflgs = flags & 4; executed 122020 times by 1 test: chflgs = flags & 4; Executed by:
| 122020 | ||||||||||||||||||||||||
56 | else | - | ||||||||||||||||||||||||
57 | chflgs = char_type[chtmp] & flags; executed 152045 times by 1 test: chflgs = char_type[chtmp] & flags; Executed by:
| 152045 | ||||||||||||||||||||||||
58 | if (chflgs & (1 | 0x20 | 0x40)
| 2120-271945 | ||||||||||||||||||||||||
59 | - | |||||||||||||||||||||||||
60 | if (chflgs & 8
| 592-1528 | ||||||||||||||||||||||||
61 | if (do_quotes
| 764 | ||||||||||||||||||||||||
62 | * executed 764 times by 1 test: do_quotes = 1;*do_quotes = 1; Executed by:
executed 764 times by 1 test: *do_quotes = 1; Executed by:
| 764 | ||||||||||||||||||||||||
63 | if (!io_ch(arg, &chtmp, 1)
| 0-1528 | ||||||||||||||||||||||||
64 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
65 | return executed 1528 times by 1 test: 1;return 1; Executed by:
executed 1528 times by 1 test: return 1; Executed by:
| 1528 | ||||||||||||||||||||||||
66 | } | - | ||||||||||||||||||||||||
67 | if (!io_ch(arg, "\\", 1)
| 0-592 | ||||||||||||||||||||||||
68 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
69 | if (!io_ch(arg, &chtmp, 1)
| 0-592 | ||||||||||||||||||||||||
70 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
71 | return executed 592 times by 1 test: 2;return 2; Executed by:
executed 592 times by 1 test: return 2; Executed by:
| 592 | ||||||||||||||||||||||||
72 | } | - | ||||||||||||||||||||||||
73 | if (chflgs & (2
| 124188-147757 | ||||||||||||||||||||||||
74 | | 4
| 124188-147757 | ||||||||||||||||||||||||
75 | | 0x400)
| 124188-147757 | ||||||||||||||||||||||||
76 | BIO_snprintf(tmphex, 11, "\\%02X", chtmp); | - | ||||||||||||||||||||||||
77 | if (!io_ch(arg, tmphex, 3)
| 0-124188 | ||||||||||||||||||||||||
78 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
79 | return executed 124188 times by 1 test: 3;return 3; Executed by:
executed 124188 times by 1 test: return 3; Executed by:
| 124188 | ||||||||||||||||||||||||
80 | } | - | ||||||||||||||||||||||||
81 | - | |||||||||||||||||||||||||
82 | - | |||||||||||||||||||||||||
83 | - | |||||||||||||||||||||||||
84 | - | |||||||||||||||||||||||||
85 | if (chtmp == '\\'
| 0-147501 | ||||||||||||||||||||||||
86 | if (!io_ch(arg, "\\\\", 2)
| 0 | ||||||||||||||||||||||||
87 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
88 | return never executed: 2;return 2; never executed: return 2; | 0 | ||||||||||||||||||||||||
89 | } | - | ||||||||||||||||||||||||
90 | if (!io_ch(arg, &chtmp, 1)
| 0-147757 | ||||||||||||||||||||||||
91 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
92 | return executed 147757 times by 1 test: 1;return 1; Executed by:
executed 147757 times by 1 test: return 1; Executed by:
| 147757 | ||||||||||||||||||||||||
93 | } | - | ||||||||||||||||||||||||
94 | static int do_buf(unsigned char *buf, int buflen, | - | ||||||||||||||||||||||||
95 | int type, unsigned short flags, char *quotes, char_io *io_ch, | - | ||||||||||||||||||||||||
96 | void *arg) | - | ||||||||||||||||||||||||
97 | { | - | ||||||||||||||||||||||||
98 | int i, outlen, len, charwidth; | - | ||||||||||||||||||||||||
99 | unsigned short orflags; | - | ||||||||||||||||||||||||
100 | unsigned char *p, *q; | - | ||||||||||||||||||||||||
101 | unsigned long c; | - | ||||||||||||||||||||||||
102 | - | |||||||||||||||||||||||||
103 | p = buf; | - | ||||||||||||||||||||||||
104 | q = buf + buflen; | - | ||||||||||||||||||||||||
105 | outlen = 0; | - | ||||||||||||||||||||||||
106 | charwidth = type & 0x7; | - | ||||||||||||||||||||||||
107 | - | |||||||||||||||||||||||||
108 | switch (charwidth) { | - | ||||||||||||||||||||||||
109 | case executed 3476 times by 1 test: 4:case 4: Executed by:
executed 3476 times by 1 test: case 4: Executed by:
| 3476 | ||||||||||||||||||||||||
110 | if (buflen & 3
| 0-3476 | ||||||||||||||||||||||||
111 | ERR_put_error(13,(142),(133),__FILE__,155); | - | ||||||||||||||||||||||||
112 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
113 | } | - | ||||||||||||||||||||||||
114 | break; executed 3476 times by 1 test: break; Executed by:
| 3476 | ||||||||||||||||||||||||
115 | case executed 6574 times by 1 test: 2:case 2: Executed by:
executed 6574 times by 1 test: case 2: Executed by:
| 6574 | ||||||||||||||||||||||||
116 | if (buflen & 1
| 0-6574 | ||||||||||||||||||||||||
117 | ERR_put_error(13,(142),(129),__FILE__,161); | - | ||||||||||||||||||||||||
118 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
119 | } | - | ||||||||||||||||||||||||
120 | break; executed 6574 times by 1 test: break; Executed by:
| 6574 | ||||||||||||||||||||||||
121 | default executed 19623 times by 1 test: :default: Executed by:
executed 19623 times by 1 test: default: Executed by:
| 19623 | ||||||||||||||||||||||||
122 | break; executed 19623 times by 1 test: break; Executed by:
| 19623 | ||||||||||||||||||||||||
123 | } | - | ||||||||||||||||||||||||
124 | - | |||||||||||||||||||||||||
125 | while (p != q
| 24336-199023 | ||||||||||||||||||||||||
126 | if (p == buf
| 6285-176464 | ||||||||||||||||||||||||
127 | orflags = 0x20; executed 16274 times by 1 test: orflags = 0x20; Executed by:
| 16274 | ||||||||||||||||||||||||
128 | else | - | ||||||||||||||||||||||||
129 | orflags = 0; executed 182749 times by 1 test: orflags = 0; Executed by:
| 182749 | ||||||||||||||||||||||||
130 | - | |||||||||||||||||||||||||
131 | switch (charwidth) { | - | ||||||||||||||||||||||||
132 | case executed 1186 times by 1 test: 4:case 4: Executed by:
executed 1186 times by 1 test: case 4: Executed by:
| 1186 | ||||||||||||||||||||||||
133 | c = ((unsigned long)*p++) << 24; | - | ||||||||||||||||||||||||
134 | c |= ((unsigned long)*p++) << 16; | - | ||||||||||||||||||||||||
135 | c |= ((unsigned long)*p++) << 8; | - | ||||||||||||||||||||||||
136 | c |= *p++; | - | ||||||||||||||||||||||||
137 | break; executed 1186 times by 1 test: break; Executed by:
| 1186 | ||||||||||||||||||||||||
138 | - | |||||||||||||||||||||||||
139 | case executed 38246 times by 1 test: 2:case 2: Executed by:
executed 38246 times by 1 test: case 2: Executed by:
| 38246 | ||||||||||||||||||||||||
140 | c = ((unsigned long)*p++) << 8; | - | ||||||||||||||||||||||||
141 | c |= *p++; | - | ||||||||||||||||||||||||
142 | break; executed 38246 times by 1 test: break; Executed by:
| 38246 | ||||||||||||||||||||||||
143 | - | |||||||||||||||||||||||||
144 | case executed 147420 times by 1 test: 1:case 1: Executed by:
executed 147420 times by 1 test: case 1: Executed by:
| 147420 | ||||||||||||||||||||||||
145 | c = *p++; | - | ||||||||||||||||||||||||
146 | break; executed 147420 times by 1 test: break; Executed by:
| 147420 | ||||||||||||||||||||||||
147 | - | |||||||||||||||||||||||||
148 | case executed 12171 times by 1 test: 0:case 0: Executed by:
executed 12171 times by 1 test: case 0: Executed by:
| 12171 | ||||||||||||||||||||||||
149 | i = UTF8_getc(p, buflen, &c); | - | ||||||||||||||||||||||||
150 | if (i < 0
| 5337-6834 | ||||||||||||||||||||||||
151 | return executed 5337 times by 1 test: -1;return -1; Executed by:
executed 5337 times by 1 test: return -1; Executed by:
| 5337 | ||||||||||||||||||||||||
152 | buflen -= i; | - | ||||||||||||||||||||||||
153 | p += i; | - | ||||||||||||||||||||||||
154 | break; executed 6834 times by 1 test: break; Executed by:
| 6834 | ||||||||||||||||||||||||
155 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||
156 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
157 | } | - | ||||||||||||||||||||||||
158 | if (p == q
| 948-176464 | ||||||||||||||||||||||||
159 | orflags = 0x40; executed 16274 times by 1 test: orflags = 0x40; Executed by:
| 16274 | ||||||||||||||||||||||||
160 | if (type & 0x8
| 80090-113596 | ||||||||||||||||||||||||
161 | unsigned char utfbuf[6]; | - | ||||||||||||||||||||||||
162 | int utflen; | - | ||||||||||||||||||||||||
163 | utflen = UTF8_putc(utfbuf, sizeof(utfbuf), c); | - | ||||||||||||||||||||||||
164 | for (i = 0; i < utflen
| 80090-161178 | ||||||||||||||||||||||||
165 | - | |||||||||||||||||||||||||
166 | - | |||||||||||||||||||||||||
167 | - | |||||||||||||||||||||||||
168 | - | |||||||||||||||||||||||||
169 | - | |||||||||||||||||||||||||
170 | - | |||||||||||||||||||||||||
171 | len = do_esc_char(utfbuf[i], flags | orflags, quotes, | - | ||||||||||||||||||||||||
172 | io_ch, arg); | - | ||||||||||||||||||||||||
173 | if (len < 0
| 0-161178 | ||||||||||||||||||||||||
174 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
175 | outlen += len; | - | ||||||||||||||||||||||||
176 | } executed 161178 times by 1 test: end of block Executed by:
| 161178 | ||||||||||||||||||||||||
177 | } executed 80090 times by 1 test: else {end of block Executed by:
| 80090 | ||||||||||||||||||||||||
178 | len = do_esc_char(c, flags | orflags, quotes, | - | ||||||||||||||||||||||||
179 | io_ch, arg); | - | ||||||||||||||||||||||||
180 | if (len < 0
| 0-113596 | ||||||||||||||||||||||||
181 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
182 | outlen += len; | - | ||||||||||||||||||||||||
183 | } executed 113596 times by 1 test: end of block Executed by:
| 113596 | ||||||||||||||||||||||||
184 | } | - | ||||||||||||||||||||||||
185 | return executed 24336 times by 1 test: outlen;return outlen; Executed by:
executed 24336 times by 1 test: return outlen; Executed by:
| 24336 | ||||||||||||||||||||||||
186 | } | - | ||||||||||||||||||||||||
187 | - | |||||||||||||||||||||||||
188 | - | |||||||||||||||||||||||||
189 | - | |||||||||||||||||||||||||
190 | static int do_hex_dump(char_io *io_ch, void *arg, unsigned char *buf, | - | ||||||||||||||||||||||||
191 | int buflen) | - | ||||||||||||||||||||||||
192 | { | - | ||||||||||||||||||||||||
193 | static const char hexdig[] = "0123456789ABCDEF"; | - | ||||||||||||||||||||||||
194 | unsigned char *p, *q; | - | ||||||||||||||||||||||||
195 | char hextmp[2]; | - | ||||||||||||||||||||||||
196 | if (arg
| 0-6930 | ||||||||||||||||||||||||
197 | p = buf; | - | ||||||||||||||||||||||||
198 | q = buf + buflen; | - | ||||||||||||||||||||||||
199 | while (p != q
| 6930-44616 | ||||||||||||||||||||||||
200 | hextmp[0] = hexdig[*p >> 4]; | - | ||||||||||||||||||||||||
201 | hextmp[1] = hexdig[*p & 0xf]; | - | ||||||||||||||||||||||||
202 | if (!io_ch(arg, hextmp, 2)
| 0-44616 | ||||||||||||||||||||||||
203 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
204 | p++; | - | ||||||||||||||||||||||||
205 | } executed 44616 times by 1 test: end of block Executed by:
| 44616 | ||||||||||||||||||||||||
206 | } executed 6930 times by 1 test: end of block Executed by:
| 6930 | ||||||||||||||||||||||||
207 | return executed 6930 times by 1 test: buflen << 1;return buflen << 1; Executed by:
executed 6930 times by 1 test: return buflen << 1; Executed by:
| 6930 | ||||||||||||||||||||||||
208 | } | - | ||||||||||||||||||||||||
209 | - | |||||||||||||||||||||||||
210 | - | |||||||||||||||||||||||||
211 | - | |||||||||||||||||||||||||
212 | - | |||||||||||||||||||||||||
213 | - | |||||||||||||||||||||||||
214 | - | |||||||||||||||||||||||||
215 | - | |||||||||||||||||||||||||
216 | static int do_dump(unsigned long lflags, char_io *io_ch, void *arg, | - | ||||||||||||||||||||||||
217 | const ASN1_STRING *str) | - | ||||||||||||||||||||||||
218 | { | - | ||||||||||||||||||||||||
219 | - | |||||||||||||||||||||||||
220 | - | |||||||||||||||||||||||||
221 | - | |||||||||||||||||||||||||
222 | - | |||||||||||||||||||||||||
223 | ASN1_TYPE t; | - | ||||||||||||||||||||||||
224 | unsigned char *der_buf, *p; | - | ||||||||||||||||||||||||
225 | int outlen, der_len; | - | ||||||||||||||||||||||||
226 | - | |||||||||||||||||||||||||
227 | if (!io_ch(arg, "#", 1)
| 0-6930 | ||||||||||||||||||||||||
228 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
229 | - | |||||||||||||||||||||||||
230 | if (!(lflags & 0x200)
| 3014-3916 | ||||||||||||||||||||||||
231 | outlen = do_hex_dump(io_ch, arg, str->data, str->length); | - | ||||||||||||||||||||||||
232 | if (outlen < 0
| 0-3014 | ||||||||||||||||||||||||
233 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
234 | return executed 3014 times by 1 test: outlen + 1;return outlen + 1; Executed by:
executed 3014 times by 1 test: return outlen + 1; Executed by:
| 3014 | ||||||||||||||||||||||||
235 | } | - | ||||||||||||||||||||||||
236 | t.type = str->type; | - | ||||||||||||||||||||||||
237 | t.value.ptr = (char *)str; | - | ||||||||||||||||||||||||
238 | der_len = i2d_ASN1_TYPE(&t, | - | ||||||||||||||||||||||||
239 | ((void *)0) | - | ||||||||||||||||||||||||
240 | ); | - | ||||||||||||||||||||||||
241 | if ((
| 0-3916 | ||||||||||||||||||||||||
242 | ((void *)0)
| 0-3916 | ||||||||||||||||||||||||
243 | ) { | - | ||||||||||||||||||||||||
244 | ERR_put_error(13,(125),((1|64)),__FILE__,284); | - | ||||||||||||||||||||||||
245 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
246 | } | - | ||||||||||||||||||||||||
247 | p = der_buf; | - | ||||||||||||||||||||||||
248 | i2d_ASN1_TYPE(&t, &p); | - | ||||||||||||||||||||||||
249 | outlen = do_hex_dump(io_ch, arg, der_buf, der_len); | - | ||||||||||||||||||||||||
250 | CRYPTO_free(der_buf, __FILE__, 290); | - | ||||||||||||||||||||||||
251 | if (outlen < 0
| 0-3916 | ||||||||||||||||||||||||
252 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
253 | return executed 3916 times by 1 test: outlen + 1;return outlen + 1; Executed by:
executed 3916 times by 1 test: return outlen + 1; Executed by:
| 3916 | ||||||||||||||||||||||||
254 | } | - | ||||||||||||||||||||||||
255 | - | |||||||||||||||||||||||||
256 | - | |||||||||||||||||||||||||
257 | - | |||||||||||||||||||||||||
258 | - | |||||||||||||||||||||||||
259 | - | |||||||||||||||||||||||||
260 | - | |||||||||||||||||||||||||
261 | - | |||||||||||||||||||||||||
262 | static const signed char tag2nbyte[] = { | - | ||||||||||||||||||||||||
263 | -1, -1, -1, -1, -1, | - | ||||||||||||||||||||||||
264 | -1, -1, -1, -1, -1, | - | ||||||||||||||||||||||||
265 | -1, -1, | - | ||||||||||||||||||||||||
266 | 0, | - | ||||||||||||||||||||||||
267 | -1, -1, -1, -1, -1, | - | ||||||||||||||||||||||||
268 | 1, | - | ||||||||||||||||||||||||
269 | 1, | - | ||||||||||||||||||||||||
270 | 1, | - | ||||||||||||||||||||||||
271 | -1, | - | ||||||||||||||||||||||||
272 | 1, | - | ||||||||||||||||||||||||
273 | 1, | - | ||||||||||||||||||||||||
274 | 1, | - | ||||||||||||||||||||||||
275 | -1, | - | ||||||||||||||||||||||||
276 | 1, | - | ||||||||||||||||||||||||
277 | -1, | - | ||||||||||||||||||||||||
278 | 4, | - | ||||||||||||||||||||||||
279 | -1, | - | ||||||||||||||||||||||||
280 | 2 | - | ||||||||||||||||||||||||
281 | }; | - | ||||||||||||||||||||||||
282 | - | |||||||||||||||||||||||||
283 | - | |||||||||||||||||||||||||
284 | - | |||||||||||||||||||||||||
285 | - | |||||||||||||||||||||||||
286 | - | |||||||||||||||||||||||||
287 | - | |||||||||||||||||||||||||
288 | - | |||||||||||||||||||||||||
289 | static int do_print_ex(char_io *io_ch, void *arg, unsigned long lflags, | - | ||||||||||||||||||||||||
290 | const ASN1_STRING *str) | - | ||||||||||||||||||||||||
291 | { | - | ||||||||||||||||||||||||
292 | int outlen, len; | - | ||||||||||||||||||||||||
293 | int type; | - | ||||||||||||||||||||||||
294 | char quotes; | - | ||||||||||||||||||||||||
295 | unsigned short flags; | - | ||||||||||||||||||||||||
296 | quotes = 0; | - | ||||||||||||||||||||||||
297 | - | |||||||||||||||||||||||||
298 | flags = (unsigned short)(lflags & (1 | 0x400 | 8 | 2 | 4)); | - | ||||||||||||||||||||||||
299 | - | |||||||||||||||||||||||||
300 | type = str->type; | - | ||||||||||||||||||||||||
301 | - | |||||||||||||||||||||||||
302 | outlen = 0; | - | ||||||||||||||||||||||||
303 | - | |||||||||||||||||||||||||
304 | if (lflags & 0x40
| 3014-21421 | ||||||||||||||||||||||||
305 | const char *tagname; | - | ||||||||||||||||||||||||
306 | tagname = ASN1_tag2str(type); | - | ||||||||||||||||||||||||
307 | outlen += strlen(tagname); | - | ||||||||||||||||||||||||
308 | if (!io_ch(arg, tagname, outlen)
| 0-3014 | ||||||||||||||||||||||||
309 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
310 | outlen++; | - | ||||||||||||||||||||||||
311 | } executed 3014 times by 1 test: end of block Executed by:
| 3014 | ||||||||||||||||||||||||
312 | - | |||||||||||||||||||||||||
313 | - | |||||||||||||||||||||||||
314 | - | |||||||||||||||||||||||||
315 | - | |||||||||||||||||||||||||
316 | if (lflags & 0x80
| 3014-21421 | ||||||||||||||||||||||||
317 | type = -1; executed 3014 times by 1 test: type = -1; Executed by:
| 3014 | ||||||||||||||||||||||||
318 | - | |||||||||||||||||||||||||
319 | else if (lflags & 0x20
| 0-21421 | ||||||||||||||||||||||||
320 | type = 1; never executed: type = 1; | 0 | ||||||||||||||||||||||||
321 | else { | - | ||||||||||||||||||||||||
322 | - | |||||||||||||||||||||||||
323 | if ((
| 0-21421 | ||||||||||||||||||||||||
324 | type = tag2nbyte[type]; executed 21181 times by 1 test: type = tag2nbyte[type]; Executed by:
| 21181 | ||||||||||||||||||||||||
325 | else | - | ||||||||||||||||||||||||
326 | type = -1; executed 240 times by 1 test: type = -1; Executed by:
| 240 | ||||||||||||||||||||||||
327 | if ((
| 0-17505 | ||||||||||||||||||||||||
328 | type = 1; never executed: type = 1; | 0 | ||||||||||||||||||||||||
329 | } executed 21421 times by 1 test: end of block Executed by:
| 21421 | ||||||||||||||||||||||||
330 | - | |||||||||||||||||||||||||
331 | if (type == -1
| 6930-17505 | ||||||||||||||||||||||||
332 | len = do_dump(lflags, io_ch, arg, str); | - | ||||||||||||||||||||||||
333 | if (len < 0
| 0-6930 | ||||||||||||||||||||||||
334 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
335 | outlen += len; | - | ||||||||||||||||||||||||
336 | return executed 6930 times by 1 test: outlen;return outlen; Executed by:
executed 6930 times by 1 test: return outlen; Executed by:
| 6930 | ||||||||||||||||||||||||
337 | } | - | ||||||||||||||||||||||||
338 | - | |||||||||||||||||||||||||
339 | if (lflags & 0x10
| 6204-11301 | ||||||||||||||||||||||||
340 | - | |||||||||||||||||||||||||
341 | - | |||||||||||||||||||||||||
342 | - | |||||||||||||||||||||||||
343 | - | |||||||||||||||||||||||||
344 | - | |||||||||||||||||||||||||
345 | if (!type
| 3204-8097 | ||||||||||||||||||||||||
346 | type = 1; executed 3204 times by 1 test: type = 1; Executed by:
| 3204 | ||||||||||||||||||||||||
347 | else | - | ||||||||||||||||||||||||
348 | type |= 0x8; executed 8097 times by 1 test: type |= 0x8; Executed by:
| 8097 | ||||||||||||||||||||||||
349 | } | - | ||||||||||||||||||||||||
350 | - | |||||||||||||||||||||||||
351 | len = do_buf(str->data, str->length, type, flags, "es, io_ch, | - | ||||||||||||||||||||||||
352 | ((void *)0) | - | ||||||||||||||||||||||||
353 | ); | - | ||||||||||||||||||||||||
354 | if (len < 0
| 5337-12168 | ||||||||||||||||||||||||
355 | return executed 5337 times by 1 test: -1;return -1; Executed by:
executed 5337 times by 1 test: return -1; Executed by:
| 5337 | ||||||||||||||||||||||||
356 | outlen += len; | - | ||||||||||||||||||||||||
357 | if (quotes
| 578-11590 | ||||||||||||||||||||||||
358 | outlen += 2; executed 578 times by 1 test: outlen += 2; Executed by:
| 578 | ||||||||||||||||||||||||
359 | if (!arg
| 0-12168 | ||||||||||||||||||||||||
360 | return never executed: outlen;return outlen; never executed: return outlen; | 0 | ||||||||||||||||||||||||
361 | if (quotes
| 0-11590 | ||||||||||||||||||||||||
362 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
363 | if (do_buf(str->data, str->length, type, flags,
| 0-12168 | ||||||||||||||||||||||||
364 | ((void *)0)
| 0-12168 | ||||||||||||||||||||||||
365 | , io_ch, arg) < 0
| 0-12168 | ||||||||||||||||||||||||
366 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
367 | if (quotes
| 0-11590 | ||||||||||||||||||||||||
368 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
369 | return executed 12168 times by 1 test: outlen;return outlen; Executed by:
executed 12168 times by 1 test: return outlen; Executed by:
| 12168 | ||||||||||||||||||||||||
370 | } | - | ||||||||||||||||||||||||
371 | - | |||||||||||||||||||||||||
372 | - | |||||||||||||||||||||||||
373 | - | |||||||||||||||||||||||||
374 | static int do_indent(char_io *io_ch, void *arg, int indent) | - | ||||||||||||||||||||||||
375 | { | - | ||||||||||||||||||||||||
376 | int i; | - | ||||||||||||||||||||||||
377 | for (i = 0; i < indent
| 175-12100 | ||||||||||||||||||||||||
378 | if (!io_ch(arg, " ", 1)
| 0-175 | ||||||||||||||||||||||||
379 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||
380 | return executed 12100 times by 1 test: 1;return 1; Executed by:
executed 12100 times by 1 test: return 1; Executed by:
| 12100 | ||||||||||||||||||||||||
381 | } | - | ||||||||||||||||||||||||
382 | - | |||||||||||||||||||||||||
383 | - | |||||||||||||||||||||||||
384 | - | |||||||||||||||||||||||||
385 | - | |||||||||||||||||||||||||
386 | static int do_name_ex(char_io *io_ch, void *arg, const X509_NAME *n, | - | ||||||||||||||||||||||||
387 | int indent, unsigned long flags) | - | ||||||||||||||||||||||||
388 | { | - | ||||||||||||||||||||||||
389 | int i, prev = -1, orflags, cnt; | - | ||||||||||||||||||||||||
390 | int fn_opt, fn_nid; | - | ||||||||||||||||||||||||
391 | ASN1_OBJECT *fn; | - | ||||||||||||||||||||||||
392 | const ASN1_STRING *val; | - | ||||||||||||||||||||||||
393 | const X509_NAME_ENTRY *ent; | - | ||||||||||||||||||||||||
394 | char objtmp[80]; | - | ||||||||||||||||||||||||
395 | const char *objbuf; | - | ||||||||||||||||||||||||
396 | int outlen, len; | - | ||||||||||||||||||||||||
397 | char *sep_dn, *sep_mv, *sep_eq; | - | ||||||||||||||||||||||||
398 | int sep_dn_len, sep_mv_len, sep_eq_len; | - | ||||||||||||||||||||||||
399 | if (indent < 0
| 0-7182 | ||||||||||||||||||||||||
400 | indent = 0; never executed: indent = 0; | 0 | ||||||||||||||||||||||||
401 | outlen = indent; | - | ||||||||||||||||||||||||
402 | if (!do_indent(io_ch, arg, indent)
| 0-7182 | ||||||||||||||||||||||||
403 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
404 | switch (flags & (0xf << 16)) { | - | ||||||||||||||||||||||||
405 | case executed 2 times by 1 test: (4 << 16):case (4 << 16): Executed by:
executed 2 times by 1 test: case (4 << 16): Executed by:
| 2 | ||||||||||||||||||||||||
406 | sep_dn = "\n"; | - | ||||||||||||||||||||||||
407 | sep_dn_len = 1; | - | ||||||||||||||||||||||||
408 | sep_mv = " + "; | - | ||||||||||||||||||||||||
409 | sep_mv_len = 3; | - | ||||||||||||||||||||||||
410 | break; executed 2 times by 1 test: break; Executed by:
| 2 | ||||||||||||||||||||||||
411 | - | |||||||||||||||||||||||||
412 | case never executed: (1 << 16):case (1 << 16): never executed: case (1 << 16): | 0 | ||||||||||||||||||||||||
413 | sep_dn = ","; | - | ||||||||||||||||||||||||
414 | sep_dn_len = 1; | - | ||||||||||||||||||||||||
415 | sep_mv = "+"; | - | ||||||||||||||||||||||||
416 | sep_mv_len = 1; | - | ||||||||||||||||||||||||
417 | indent = 0; | - | ||||||||||||||||||||||||
418 | break; never executed: break; | 0 | ||||||||||||||||||||||||
419 | - | |||||||||||||||||||||||||
420 | case executed 7180 times by 1 test: (2 << 16):case (2 << 16): Executed by:
executed 7180 times by 1 test: case (2 << 16): Executed by:
| 7180 | ||||||||||||||||||||||||
421 | sep_dn = ", "; | - | ||||||||||||||||||||||||
422 | sep_dn_len = 2; | - | ||||||||||||||||||||||||
423 | sep_mv = " + "; | - | ||||||||||||||||||||||||
424 | sep_mv_len = 3; | - | ||||||||||||||||||||||||
425 | indent = 0; | - | ||||||||||||||||||||||||
426 | break; executed 7180 times by 1 test: break; Executed by:
| 7180 | ||||||||||||||||||||||||
427 | - | |||||||||||||||||||||||||
428 | case never executed: (3 << 16):case (3 << 16): never executed: case (3 << 16): | 0 | ||||||||||||||||||||||||
429 | sep_dn = "; "; | - | ||||||||||||||||||||||||
430 | sep_dn_len = 2; | - | ||||||||||||||||||||||||
431 | sep_mv = " + "; | - | ||||||||||||||||||||||||
432 | sep_mv_len = 3; | - | ||||||||||||||||||||||||
433 | indent = 0; | - | ||||||||||||||||||||||||
434 | break; never executed: break; | 0 | ||||||||||||||||||||||||
435 | - | |||||||||||||||||||||||||
436 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||
437 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
438 | } | - | ||||||||||||||||||||||||
439 | - | |||||||||||||||||||||||||
440 | if (flags & (1 << 23)
| 5-7177 | ||||||||||||||||||||||||
441 | sep_eq = " = "; | - | ||||||||||||||||||||||||
442 | sep_eq_len = 3; | - | ||||||||||||||||||||||||
443 | } executed 7177 times by 1 test: else {end of block Executed by:
| 7177 | ||||||||||||||||||||||||
444 | sep_eq = "="; | - | ||||||||||||||||||||||||
445 | sep_eq_len = 1; | - | ||||||||||||||||||||||||
446 | } executed 5 times by 1 test: end of block Executed by:
| 5 | ||||||||||||||||||||||||
447 | - | |||||||||||||||||||||||||
448 | fn_opt = flags & (0x3 << 21); | - | ||||||||||||||||||||||||
449 | - | |||||||||||||||||||||||||
450 | cnt = X509_NAME_entry_count(n); | - | ||||||||||||||||||||||||
451 | for (i = 0; i < cnt
| 7182-15238 | ||||||||||||||||||||||||
452 | if (flags & (1 << 20)
| 0-15238 | ||||||||||||||||||||||||
453 | ent = X509_NAME_get_entry(n, cnt - i - 1); never executed: ent = X509_NAME_get_entry(n, cnt - i - 1); | 0 | ||||||||||||||||||||||||
454 | else | - | ||||||||||||||||||||||||
455 | ent = X509_NAME_get_entry(n, i); executed 15238 times by 1 test: ent = X509_NAME_get_entry(n, i); Executed by:
| 15238 | ||||||||||||||||||||||||
456 | if (prev != -1
| 4892-10346 | ||||||||||||||||||||||||
457 | if (prev == X509_NAME_ENTRY_set(ent)
| 4911-5435 | ||||||||||||||||||||||||
458 | if (!io_ch(arg, sep_mv, sep_mv_len)
| 0-5435 | ||||||||||||||||||||||||
459 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
460 | outlen += sep_mv_len; | - | ||||||||||||||||||||||||
461 | } executed 5435 times by 1 test: else {end of block Executed by:
| 5435 | ||||||||||||||||||||||||
462 | if (!io_ch(arg, sep_dn, sep_dn_len)
| 0-4911 | ||||||||||||||||||||||||
463 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
464 | outlen += sep_dn_len; | - | ||||||||||||||||||||||||
465 | if (!do_indent(io_ch, arg, indent)
| 0-4911 | ||||||||||||||||||||||||
466 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
467 | outlen += indent; | - | ||||||||||||||||||||||||
468 | } executed 4911 times by 1 test: end of block Executed by:
| 4911 | ||||||||||||||||||||||||
469 | } | - | ||||||||||||||||||||||||
470 | prev = X509_NAME_ENTRY_set(ent); | - | ||||||||||||||||||||||||
471 | fn = X509_NAME_ENTRY_get_object(ent); | - | ||||||||||||||||||||||||
472 | val = X509_NAME_ENTRY_get_data(ent); | - | ||||||||||||||||||||||||
473 | fn_nid = OBJ_obj2nid(fn); | - | ||||||||||||||||||||||||
474 | if (fn_opt != (3 << 21)
| 0-15238 | ||||||||||||||||||||||||
475 | int objlen, fld_len; | - | ||||||||||||||||||||||||
476 | if ((
| 0-15238 | ||||||||||||||||||||||||
477 | OBJ_obj2txt(objtmp, sizeof(objtmp), fn, 1); | - | ||||||||||||||||||||||||
478 | fld_len = 0; | - | ||||||||||||||||||||||||
479 | objbuf = objtmp; | - | ||||||||||||||||||||||||
480 | } executed 8233 times by 1 test: else {end of block Executed by:
| 8233 | ||||||||||||||||||||||||
481 | if (fn_opt == 0
| 7-6998 | ||||||||||||||||||||||||
482 | fld_len = 10; | - | ||||||||||||||||||||||||
483 | objbuf = OBJ_nid2sn(fn_nid); | - | ||||||||||||||||||||||||
484 | } executed 6998 times by 1 test: else if (fn_opt == (1 << 21)end of block Executed by:
| 0-6998 | ||||||||||||||||||||||||
485 | fld_len = 25; | - | ||||||||||||||||||||||||
486 | objbuf = OBJ_nid2ln(fn_nid); | - | ||||||||||||||||||||||||
487 | } executed 7 times by 1 test: else {end of block Executed by:
| 7 | ||||||||||||||||||||||||
488 | fld_len = 0; | - | ||||||||||||||||||||||||
489 | objbuf = ""; | - | ||||||||||||||||||||||||
490 | } never executed: end of block | 0 | ||||||||||||||||||||||||
491 | } | - | ||||||||||||||||||||||||
492 | objlen = strlen(objbuf); | - | ||||||||||||||||||||||||
493 | if (!io_ch(arg, objbuf, objlen)
| 0-15238 | ||||||||||||||||||||||||
494 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
495 | if ((
| 7-11148 | ||||||||||||||||||||||||
496 | if (!do_indent(io_ch, arg, fld_len - objlen)
| 0-7 | ||||||||||||||||||||||||
497 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
498 | outlen += fld_len - objlen; | - | ||||||||||||||||||||||||
499 | } executed 7 times by 1 test: end of block Executed by:
| 7 | ||||||||||||||||||||||||
500 | if (!io_ch(arg, sep_eq, sep_eq_len)
| 0-15238 | ||||||||||||||||||||||||
501 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
502 | outlen += objlen + sep_eq_len; | - | ||||||||||||||||||||||||
503 | } executed 15238 times by 1 test: end of block Executed by:
| 15238 | ||||||||||||||||||||||||
504 | - | |||||||||||||||||||||||||
505 | - | |||||||||||||||||||||||||
506 | - | |||||||||||||||||||||||||
507 | - | |||||||||||||||||||||||||
508 | - | |||||||||||||||||||||||||
509 | if ((
| 0-8233 | ||||||||||||||||||||||||
510 | orflags = 0x80; never executed: orflags = 0x80; | 0 | ||||||||||||||||||||||||
511 | else | - | ||||||||||||||||||||||||
512 | orflags = 0; executed 15238 times by 1 test: orflags = 0; Executed by:
| 15238 | ||||||||||||||||||||||||
513 | - | |||||||||||||||||||||||||
514 | len = do_print_ex(io_ch, arg, flags | orflags, val); | - | ||||||||||||||||||||||||
515 | if (len < 0
| 0-15238 | ||||||||||||||||||||||||
516 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
517 | outlen += len; | - | ||||||||||||||||||||||||
518 | } executed 15238 times by 1 test: end of block Executed by:
| 15238 | ||||||||||||||||||||||||
519 | return executed 7182 times by 1 test: outlen;return outlen; Executed by:
executed 7182 times by 1 test: return outlen; Executed by:
| 7182 | ||||||||||||||||||||||||
520 | } | - | ||||||||||||||||||||||||
521 | - | |||||||||||||||||||||||||
522 | - | |||||||||||||||||||||||||
523 | - | |||||||||||||||||||||||||
524 | int X509_NAME_print_ex(BIO *out, const X509_NAME *nm, int indent, | - | ||||||||||||||||||||||||
525 | unsigned long flags) | - | ||||||||||||||||||||||||
526 | { | - | ||||||||||||||||||||||||
527 | if (flags == 0
| 5796-7182 | ||||||||||||||||||||||||
528 | return executed 5796 times by 1 test: X509_NAME_print(out, nm, indent);return X509_NAME_print(out, nm, indent); Executed by:
executed 5796 times by 1 test: return X509_NAME_print(out, nm, indent); Executed by:
| 5796 | ||||||||||||||||||||||||
529 | return executed 7182 times by 1 test: do_name_ex(send_bio_chars, out, nm, indent, flags);return do_name_ex(send_bio_chars, out, nm, indent, flags); Executed by:
executed 7182 times by 1 test: return do_name_ex(send_bio_chars, out, nm, indent, flags); Executed by:
| 7182 | ||||||||||||||||||||||||
530 | } | - | ||||||||||||||||||||||||
531 | - | |||||||||||||||||||||||||
532 | - | |||||||||||||||||||||||||
533 | int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent, | - | ||||||||||||||||||||||||
534 | unsigned long flags) | - | ||||||||||||||||||||||||
535 | { | - | ||||||||||||||||||||||||
536 | if (flags == 0
| 0 | ||||||||||||||||||||||||
537 | BIO *btmp; | - | ||||||||||||||||||||||||
538 | int ret; | - | ||||||||||||||||||||||||
539 | btmp = BIO_new_fp(fp, 0x00); | - | ||||||||||||||||||||||||
540 | if (!btmp
| 0 | ||||||||||||||||||||||||
541 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
542 | ret = X509_NAME_print(btmp, nm, indent); | - | ||||||||||||||||||||||||
543 | BIO_free(btmp); | - | ||||||||||||||||||||||||
544 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||
545 | } | - | ||||||||||||||||||||||||
546 | return never executed: do_name_ex(send_fp_chars, fp, nm, indent, flags);return do_name_ex(send_fp_chars, fp, nm, indent, flags); never executed: return do_name_ex(send_fp_chars, fp, nm, indent, flags); | 0 | ||||||||||||||||||||||||
547 | } | - | ||||||||||||||||||||||||
548 | - | |||||||||||||||||||||||||
549 | - | |||||||||||||||||||||||||
550 | int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags) | - | ||||||||||||||||||||||||
551 | { | - | ||||||||||||||||||||||||
552 | return executed 9197 times by 1 test: do_print_ex(send_bio_chars, out, flags, str);return do_print_ex(send_bio_chars, out, flags, str); Executed by:
executed 9197 times by 1 test: return do_print_ex(send_bio_chars, out, flags, str); Executed by:
| 9197 | ||||||||||||||||||||||||
553 | } | - | ||||||||||||||||||||||||
554 | - | |||||||||||||||||||||||||
555 | - | |||||||||||||||||||||||||
556 | int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags) | - | ||||||||||||||||||||||||
557 | { | - | ||||||||||||||||||||||||
558 | return never executed: do_print_ex(send_fp_chars, fp, flags, str);return do_print_ex(send_fp_chars, fp, flags, str); never executed: return do_print_ex(send_fp_chars, fp, flags, str); | 0 | ||||||||||||||||||||||||
559 | } | - | ||||||||||||||||||||||||
560 | - | |||||||||||||||||||||||||
561 | - | |||||||||||||||||||||||||
562 | - | |||||||||||||||||||||||||
563 | - | |||||||||||||||||||||||||
564 | - | |||||||||||||||||||||||||
565 | - | |||||||||||||||||||||||||
566 | - | |||||||||||||||||||||||||
567 | int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in) | - | ||||||||||||||||||||||||
568 | { | - | ||||||||||||||||||||||||
569 | ASN1_STRING stmp, *str = &stmp; | - | ||||||||||||||||||||||||
570 | int mbflag, type, ret; | - | ||||||||||||||||||||||||
571 | if (!in
| 0-154154 | ||||||||||||||||||||||||
572 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
573 | type = in->type; | - | ||||||||||||||||||||||||
574 | if ((
| 0-154154 | ||||||||||||||||||||||||
575 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
576 | mbflag = tag2nbyte[type]; | - | ||||||||||||||||||||||||
577 | if (mbflag == -1
| 0-154154 | ||||||||||||||||||||||||
578 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||
579 | mbflag |= 0x1000; | - | ||||||||||||||||||||||||
580 | stmp.data = | - | ||||||||||||||||||||||||
581 | ((void *)0) | - | ||||||||||||||||||||||||
582 | ; | - | ||||||||||||||||||||||||
583 | stmp.length = 0; | - | ||||||||||||||||||||||||
584 | stmp.flags = 0; | - | ||||||||||||||||||||||||
585 | ret = | - | ||||||||||||||||||||||||
586 | ASN1_mbstring_copy(&str, in->data, in->length, mbflag, | - | ||||||||||||||||||||||||
587 | 0x2000); | - | ||||||||||||||||||||||||
588 | if (ret < 0
| 4656-149498 | ||||||||||||||||||||||||
589 | return executed 4656 times by 1 test: ret;return ret; Executed by:
executed 4656 times by 1 test: return ret; Executed by:
| 4656 | ||||||||||||||||||||||||
590 | *out = stmp.data; | - | ||||||||||||||||||||||||
591 | return executed 149498 times by 1 test: stmp.length;return stmp.length; Executed by:
executed 149498 times by 1 test: return stmp.length; Executed by:
| 149498 | ||||||||||||||||||||||||
592 | } | - | ||||||||||||||||||||||||
Switch to Source code | Preprocessed file |