Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/ui/ui_lib.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||
2 | - | |||||||||||||||||||
3 | - | |||||||||||||||||||
4 | - | |||||||||||||||||||
5 | UI *UI_new(void) | - | ||||||||||||||||||
6 | { | - | ||||||||||||||||||
7 | return never executed: UI_new_method(return UI_new_method( ((void *)0) ); never executed: return UI_new_method( ((void *)0) ); | 0 | ||||||||||||||||||
8 | ((void *)0) never executed: return UI_new_method( ((void *)0) ); | 0 | ||||||||||||||||||
9 | ); never executed: return UI_new_method( ((void *)0) ); | 0 | ||||||||||||||||||
10 | } | - | ||||||||||||||||||
11 | - | |||||||||||||||||||
12 | UI *UI_new_method(const UI_METHOD *method) | - | ||||||||||||||||||
13 | { | - | ||||||||||||||||||
14 | UI *ret = CRYPTO_zalloc(sizeof(*ret), __FILE__, 25); | - | ||||||||||||||||||
15 | - | |||||||||||||||||||
16 | if (ret ==
| 0-5 | ||||||||||||||||||
17 | ((void *)0)
| 0-5 | ||||||||||||||||||
18 | ) { | - | ||||||||||||||||||
19 | ERR_put_error(40,(104),((1|64)),__FILE__,28); | - | ||||||||||||||||||
20 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
21 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
22 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
23 | } | - | ||||||||||||||||||
24 | - | |||||||||||||||||||
25 | ret->lock = CRYPTO_THREAD_lock_new(); | - | ||||||||||||||||||
26 | if (ret->lock ==
| 0-5 | ||||||||||||||||||
27 | ((void *)0)
| 0-5 | ||||||||||||||||||
28 | ) { | - | ||||||||||||||||||
29 | ERR_put_error(40,(104),((1|64)),__FILE__,34); | - | ||||||||||||||||||
30 | CRYPTO_free(ret, __FILE__, 35); | - | ||||||||||||||||||
31 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
32 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
33 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
34 | } | - | ||||||||||||||||||
35 | - | |||||||||||||||||||
36 | if (method ==
| 0-5 | ||||||||||||||||||
37 | ((void *)0)
| 0-5 | ||||||||||||||||||
38 | ) | - | ||||||||||||||||||
39 | method = UI_get_default_method(); never executed: method = UI_get_default_method(); | 0 | ||||||||||||||||||
40 | if (method ==
| 0-5 | ||||||||||||||||||
41 | ((void *)0)
| 0-5 | ||||||||||||||||||
42 | ) | - | ||||||||||||||||||
43 | method = UI_null(); never executed: method = UI_null(); | 0 | ||||||||||||||||||
44 | ret->meth = method; | - | ||||||||||||||||||
45 | - | |||||||||||||||||||
46 | if (!CRYPTO_new_ex_data(11, ret, &ret->ex_data)
| 0-5 | ||||||||||||||||||
47 | CRYPTO_free(ret, __FILE__, 46); | - | ||||||||||||||||||
48 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
49 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
50 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
51 | } | - | ||||||||||||||||||
52 | return executed 5 times by 1 test: ret;return ret; Executed by:
executed 5 times by 1 test: return ret; Executed by:
| 5 | ||||||||||||||||||
53 | } | - | ||||||||||||||||||
54 | - | |||||||||||||||||||
55 | static void free_string(UI_STRING *uis) | - | ||||||||||||||||||
56 | { | - | ||||||||||||||||||
57 | if (uis->flags & 0x01
| 0-5 | ||||||||||||||||||
58 | CRYPTO_free((char *)uis->out_string, __FILE__, 55); | - | ||||||||||||||||||
59 | switch (uis->type) { | - | ||||||||||||||||||
60 | case never executed: UIT_BOOLEAN:case UIT_BOOLEAN: never executed: case UIT_BOOLEAN: | 0 | ||||||||||||||||||
61 | CRYPTO_free((char *)uis->_.boolean_data.action_desc, __FILE__, 58); | - | ||||||||||||||||||
62 | CRYPTO_free((char *)uis->_.boolean_data.ok_chars, __FILE__, 59); | - | ||||||||||||||||||
63 | CRYPTO_free((char *)uis->_.boolean_data.cancel_chars, __FILE__, 60); | - | ||||||||||||||||||
64 | break; never executed: break; | 0 | ||||||||||||||||||
65 | case never executed: UIT_NONE:case UIT_NONE: never executed: case UIT_NONE: | 0 | ||||||||||||||||||
66 | case never executed: UIT_PROMPT:case UIT_PROMPT: never executed: case UIT_PROMPT: | 0 | ||||||||||||||||||
67 | case never executed: UIT_VERIFY:case UIT_VERIFY: never executed: case UIT_VERIFY: | 0 | ||||||||||||||||||
68 | case never executed: UIT_ERROR:case UIT_ERROR: never executed: case UIT_ERROR: | 0 | ||||||||||||||||||
69 | case never executed: UIT_INFO:case UIT_INFO: never executed: case UIT_INFO: | 0 | ||||||||||||||||||
70 | break; never executed: break; | 0 | ||||||||||||||||||
71 | } | - | ||||||||||||||||||
72 | } never executed: end of block | 0 | ||||||||||||||||||
73 | CRYPTO_free(uis, __FILE__, 70); | - | ||||||||||||||||||
74 | } executed 5 times by 1 test: end of block Executed by:
| 5 | ||||||||||||||||||
75 | - | |||||||||||||||||||
76 | void UI_free(UI *ui) | - | ||||||||||||||||||
77 | { | - | ||||||||||||||||||
78 | if (ui ==
| 0-5 | ||||||||||||||||||
79 | ((void *)0)
| 0-5 | ||||||||||||||||||
80 | ) | - | ||||||||||||||||||
81 | return; never executed: return; | 0 | ||||||||||||||||||
82 | if ((
| 0-5 | ||||||||||||||||||
83 | ui->meth->ui_destroy_data(ui, ui->user_data); | - | ||||||||||||||||||
84 | } never executed: end of block | 0 | ||||||||||||||||||
85 | sk_UI_STRING_pop_free(ui->strings, free_string); | - | ||||||||||||||||||
86 | CRYPTO_free_ex_data(11, ui, &ui->ex_data); | - | ||||||||||||||||||
87 | CRYPTO_THREAD_lock_free(ui->lock); | - | ||||||||||||||||||
88 | CRYPTO_free(ui, __FILE__, 83); | - | ||||||||||||||||||
89 | } executed 5 times by 1 test: end of block Executed by:
| 5 | ||||||||||||||||||
90 | - | |||||||||||||||||||
91 | static int allocate_string_stack(UI *ui) | - | ||||||||||||||||||
92 | { | - | ||||||||||||||||||
93 | if (ui->strings ==
| 0-5 | ||||||||||||||||||
94 | ((void *)0)
| 0-5 | ||||||||||||||||||
95 | ) { | - | ||||||||||||||||||
96 | ui->strings = sk_UI_STRING_new_null(); | - | ||||||||||||||||||
97 | if (ui->strings ==
| 0-5 | ||||||||||||||||||
98 | ((void *)0)
| 0-5 | ||||||||||||||||||
99 | ) { | - | ||||||||||||||||||
100 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
101 | } | - | ||||||||||||||||||
102 | } executed 5 times by 1 test: end of block Executed by:
| 5 | ||||||||||||||||||
103 | return executed 5 times by 1 test: 0;return 0; Executed by:
executed 5 times by 1 test: return 0; Executed by:
| 5 | ||||||||||||||||||
104 | } | - | ||||||||||||||||||
105 | - | |||||||||||||||||||
106 | static UI_STRING *general_allocate_prompt(UI *ui, const char *prompt, | - | ||||||||||||||||||
107 | int prompt_freeable, | - | ||||||||||||||||||
108 | enum UI_string_types type, | - | ||||||||||||||||||
109 | int input_flags, char *result_buf) | - | ||||||||||||||||||
110 | { | - | ||||||||||||||||||
111 | UI_STRING *ret = | - | ||||||||||||||||||
112 | ((void *)0) | - | ||||||||||||||||||
113 | ; | - | ||||||||||||||||||
114 | - | |||||||||||||||||||
115 | if (prompt ==
| 0-5 | ||||||||||||||||||
116 | ((void *)0)
| 0-5 | ||||||||||||||||||
117 | ) { | - | ||||||||||||||||||
118 | ERR_put_error(40,(109),((3|64)),__FILE__,105); | - | ||||||||||||||||||
119 | } never executed: else if ((type == UIT_PROMPTend of block
| 0-5 | ||||||||||||||||||
120 | || type == UIT_BOOLEAN
| 0-5 | ||||||||||||||||||
121 | ((void *)0)
| 0-5 | ||||||||||||||||||
122 | ) { | - | ||||||||||||||||||
123 | ERR_put_error(40,(109),(105),__FILE__,108); | - | ||||||||||||||||||
124 | } never executed: else if ((end of block
| 0-5 | ||||||||||||||||||
125 | ((void *)0)
| 0-5 | ||||||||||||||||||
126 | ) { | - | ||||||||||||||||||
127 | ret->out_string = prompt; | - | ||||||||||||||||||
128 | ret->flags = prompt_freeable
| 0-5 | ||||||||||||||||||
129 | ret->input_flags = input_flags; | - | ||||||||||||||||||
130 | ret->type = type; | - | ||||||||||||||||||
131 | ret->result_buf = result_buf; | - | ||||||||||||||||||
132 | } executed 5 times by 1 test: end of block Executed by:
| 5 | ||||||||||||||||||
133 | return executed 5 times by 1 test: ret;return ret; Executed by:
executed 5 times by 1 test: return ret; Executed by:
| 5 | ||||||||||||||||||
134 | } | - | ||||||||||||||||||
135 | - | |||||||||||||||||||
136 | static int general_allocate_string(UI *ui, const char *prompt, | - | ||||||||||||||||||
137 | int prompt_freeable, | - | ||||||||||||||||||
138 | enum UI_string_types type, int input_flags, | - | ||||||||||||||||||
139 | char *result_buf, int minsize, int maxsize, | - | ||||||||||||||||||
140 | const char *test_buf) | - | ||||||||||||||||||
141 | { | - | ||||||||||||||||||
142 | int ret = -1; | - | ||||||||||||||||||
143 | UI_STRING *s = general_allocate_prompt(ui, prompt, prompt_freeable, | - | ||||||||||||||||||
144 | type, input_flags, result_buf); | - | ||||||||||||||||||
145 | - | |||||||||||||||||||
146 | if (s !=
| 0-5 | ||||||||||||||||||
147 | ((void *)0)
| 0-5 | ||||||||||||||||||
148 | ) { | - | ||||||||||||||||||
149 | if (allocate_string_stack(ui) >= 0
| 0-5 | ||||||||||||||||||
150 | s->_.string_data.result_minsize = minsize; | - | ||||||||||||||||||
151 | s->_.string_data.result_maxsize = maxsize; | - | ||||||||||||||||||
152 | s->_.string_data.test_buf = test_buf; | - | ||||||||||||||||||
153 | ret = sk_UI_STRING_push(ui->strings, s); | - | ||||||||||||||||||
154 | - | |||||||||||||||||||
155 | if (ret <= 0
| 0-5 | ||||||||||||||||||
156 | ret--; | - | ||||||||||||||||||
157 | free_string(s); | - | ||||||||||||||||||
158 | } never executed: end of block | 0 | ||||||||||||||||||
159 | } executed 5 times by 1 test: elseend of block Executed by:
| 5 | ||||||||||||||||||
160 | free_string(s); never executed: free_string(s); | 0 | ||||||||||||||||||
161 | } | - | ||||||||||||||||||
162 | return executed 5 times by 1 test: ret;return ret; Executed by:
executed 5 times by 1 test: return ret; Executed by:
| 5 | ||||||||||||||||||
163 | } | - | ||||||||||||||||||
164 | - | |||||||||||||||||||
165 | static int general_allocate_boolean(UI *ui, | - | ||||||||||||||||||
166 | const char *prompt, | - | ||||||||||||||||||
167 | const char *action_desc, | - | ||||||||||||||||||
168 | const char *ok_chars, | - | ||||||||||||||||||
169 | const char *cancel_chars, | - | ||||||||||||||||||
170 | int prompt_freeable, | - | ||||||||||||||||||
171 | enum UI_string_types type, | - | ||||||||||||||||||
172 | int input_flags, char *result_buf) | - | ||||||||||||||||||
173 | { | - | ||||||||||||||||||
174 | int ret = -1; | - | ||||||||||||||||||
175 | UI_STRING *s; | - | ||||||||||||||||||
176 | const char *p; | - | ||||||||||||||||||
177 | - | |||||||||||||||||||
178 | if (ok_chars ==
| 0 | ||||||||||||||||||
179 | ((void *)0)
| 0 | ||||||||||||||||||
180 | ) { | - | ||||||||||||||||||
181 | ERR_put_error(40,(108),((3|64)),__FILE__,160); | - | ||||||||||||||||||
182 | } never executed: else if (cancel_chars == end of block
| 0 | ||||||||||||||||||
183 | ((void *)0)
| 0 | ||||||||||||||||||
184 | ) { | - | ||||||||||||||||||
185 | ERR_put_error(40,(108),((3|64)),__FILE__,162); | - | ||||||||||||||||||
186 | } never executed: else {end of block | 0 | ||||||||||||||||||
187 | for (p = ok_chars; *
| 0 | ||||||||||||||||||
188 | if ( | - | ||||||||||||||||||
189 | (
| 0 | ||||||||||||||||||
190 | *p
| 0 | ||||||||||||||||||
191 | )
| 0 | ||||||||||||||||||
192 | cancel_chars
| 0 | ||||||||||||||||||
193 | )
| 0 | ||||||||||||||||||
194 | *p
| 0 | ||||||||||||||||||
195 | ) == '\0'
| 0 | ||||||||||||||||||
196 | cancel_chars
| 0 | ||||||||||||||||||
197 | ,
| 0 | ||||||||||||||||||
198 | *p
| 0 | ||||||||||||||||||
199 | ) : __builtin_strchr (
| 0 | ||||||||||||||||||
200 | cancel_chars
| 0 | ||||||||||||||||||
201 | ,
| 0 | ||||||||||||||||||
202 | *p
| 0 | ||||||||||||||||||
203 | )))
| 0 | ||||||||||||||||||
204 | !=
| 0 | ||||||||||||||||||
205 | ((void *)0)
| 0 | ||||||||||||||||||
206 | ) { | - | ||||||||||||||||||
207 | ERR_put_error(40,(108),(104),__FILE__,167) | - | ||||||||||||||||||
208 | ; | - | ||||||||||||||||||
209 | } never executed: end of block | 0 | ||||||||||||||||||
210 | } never executed: end of block | 0 | ||||||||||||||||||
211 | - | |||||||||||||||||||
212 | s = general_allocate_prompt(ui, prompt, prompt_freeable, | - | ||||||||||||||||||
213 | type, input_flags, result_buf); | - | ||||||||||||||||||
214 | - | |||||||||||||||||||
215 | if (s !=
| 0 | ||||||||||||||||||
216 | ((void *)0)
| 0 | ||||||||||||||||||
217 | ) { | - | ||||||||||||||||||
218 | if (allocate_string_stack(ui) >= 0
| 0 | ||||||||||||||||||
219 | s->_.boolean_data.action_desc = action_desc; | - | ||||||||||||||||||
220 | s->_.boolean_data.ok_chars = ok_chars; | - | ||||||||||||||||||
221 | s->_.boolean_data.cancel_chars = cancel_chars; | - | ||||||||||||||||||
222 | ret = sk_UI_STRING_push(ui->strings, s); | - | ||||||||||||||||||
223 | - | |||||||||||||||||||
224 | - | |||||||||||||||||||
225 | - | |||||||||||||||||||
226 | if (ret <= 0
| 0 | ||||||||||||||||||
227 | ret--; | - | ||||||||||||||||||
228 | free_string(s); | - | ||||||||||||||||||
229 | } never executed: end of block | 0 | ||||||||||||||||||
230 | } never executed: elseend of block | 0 | ||||||||||||||||||
231 | free_string(s); never executed: free_string(s); | 0 | ||||||||||||||||||
232 | } | - | ||||||||||||||||||
233 | } never executed: end of block | 0 | ||||||||||||||||||
234 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||
235 | } | - | ||||||||||||||||||
236 | - | |||||||||||||||||||
237 | - | |||||||||||||||||||
238 | - | |||||||||||||||||||
239 | - | |||||||||||||||||||
240 | - | |||||||||||||||||||
241 | int UI_add_input_string(UI *ui, const char *prompt, int flags, | - | ||||||||||||||||||
242 | char *result_buf, int minsize, int maxsize) | - | ||||||||||||||||||
243 | { | - | ||||||||||||||||||
244 | return executed 5 times by 1 test: general_allocate_string(ui, prompt, 0,return general_allocate_string(ui, prompt, 0, UIT_PROMPT, flags, result_buf, minsize, maxsize, ((void *)0) ); Executed by:
executed 5 times by 1 test: return general_allocate_string(ui, prompt, 0, UIT_PROMPT, flags, result_buf, minsize, maxsize, ((void *)0) ); Executed by:
| 5 | ||||||||||||||||||
245 | UIT_PROMPT, flags, result_buf, minsize, executed 5 times by 1 test: return general_allocate_string(ui, prompt, 0, UIT_PROMPT, flags, result_buf, minsize, maxsize, ((void *)0) ); Executed by:
| 5 | ||||||||||||||||||
246 | maxsize, executed 5 times by 1 test: return general_allocate_string(ui, prompt, 0, UIT_PROMPT, flags, result_buf, minsize, maxsize, ((void *)0) ); Executed by:
| 5 | ||||||||||||||||||
247 | ((void *)0) executed 5 times by 1 test: return general_allocate_string(ui, prompt, 0, UIT_PROMPT, flags, result_buf, minsize, maxsize, ((void *)0) ); Executed by:
| 5 | ||||||||||||||||||
248 | ); executed 5 times by 1 test: return general_allocate_string(ui, prompt, 0, UIT_PROMPT, flags, result_buf, minsize, maxsize, ((void *)0) ); Executed by:
| 5 | ||||||||||||||||||
249 | } | - | ||||||||||||||||||
250 | - | |||||||||||||||||||
251 | - | |||||||||||||||||||
252 | int UI_dup_input_string(UI *ui, const char *prompt, int flags, | - | ||||||||||||||||||
253 | char *result_buf, int minsize, int maxsize) | - | ||||||||||||||||||
254 | { | - | ||||||||||||||||||
255 | char *prompt_copy = | - | ||||||||||||||||||
256 | ((void *)0) | - | ||||||||||||||||||
257 | ; | - | ||||||||||||||||||
258 | - | |||||||||||||||||||
259 | if (prompt !=
| 0 | ||||||||||||||||||
260 | ((void *)0)
| 0 | ||||||||||||||||||
261 | ) { | - | ||||||||||||||||||
262 | prompt_copy = CRYPTO_strdup(prompt, __FILE__, 213); | - | ||||||||||||||||||
263 | if (prompt_copy ==
| 0 | ||||||||||||||||||
264 | ((void *)0)
| 0 | ||||||||||||||||||
265 | ) { | - | ||||||||||||||||||
266 | ERR_put_error(40,(103),((1|64)),__FILE__,215); | - | ||||||||||||||||||
267 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
268 | } | - | ||||||||||||||||||
269 | } never executed: end of block | 0 | ||||||||||||||||||
270 | - | |||||||||||||||||||
271 | return never executed: general_allocate_string(ui, prompt_copy, 1,return general_allocate_string(ui, prompt_copy, 1, UIT_PROMPT, flags, result_buf, minsize, maxsize, ((void *)0) ); never executed: return general_allocate_string(ui, prompt_copy, 1, UIT_PROMPT, flags, result_buf, minsize, maxsize, ((void *)0) ); | 0 | ||||||||||||||||||
272 | UIT_PROMPT, flags, result_buf, minsize, never executed: return general_allocate_string(ui, prompt_copy, 1, UIT_PROMPT, flags, result_buf, minsize, maxsize, ((void *)0) ); | 0 | ||||||||||||||||||
273 | maxsize, never executed: return general_allocate_string(ui, prompt_copy, 1, UIT_PROMPT, flags, result_buf, minsize, maxsize, ((void *)0) ); | 0 | ||||||||||||||||||
274 | ((void *)0) never executed: return general_allocate_string(ui, prompt_copy, 1, UIT_PROMPT, flags, result_buf, minsize, maxsize, ((void *)0) ); | 0 | ||||||||||||||||||
275 | ); never executed: return general_allocate_string(ui, prompt_copy, 1, UIT_PROMPT, flags, result_buf, minsize, maxsize, ((void *)0) ); | 0 | ||||||||||||||||||
276 | } | - | ||||||||||||||||||
277 | - | |||||||||||||||||||
278 | int UI_add_verify_string(UI *ui, const char *prompt, int flags, | - | ||||||||||||||||||
279 | char *result_buf, int minsize, int maxsize, | - | ||||||||||||||||||
280 | const char *test_buf) | - | ||||||||||||||||||
281 | { | - | ||||||||||||||||||
282 | return never executed: general_allocate_string(ui, prompt, 0,return general_allocate_string(ui, prompt, 0, UIT_VERIFY, flags, result_buf, minsize, maxsize, test_buf); never executed: return general_allocate_string(ui, prompt, 0, UIT_VERIFY, flags, result_buf, minsize, maxsize, test_buf); | 0 | ||||||||||||||||||
283 | UIT_VERIFY, flags, result_buf, minsize, never executed: return general_allocate_string(ui, prompt, 0, UIT_VERIFY, flags, result_buf, minsize, maxsize, test_buf); | 0 | ||||||||||||||||||
284 | maxsize, test_buf); never executed: return general_allocate_string(ui, prompt, 0, UIT_VERIFY, flags, result_buf, minsize, maxsize, test_buf); | 0 | ||||||||||||||||||
285 | } | - | ||||||||||||||||||
286 | - | |||||||||||||||||||
287 | int UI_dup_verify_string(UI *ui, const char *prompt, int flags, | - | ||||||||||||||||||
288 | char *result_buf, int minsize, int maxsize, | - | ||||||||||||||||||
289 | const char *test_buf) | - | ||||||||||||||||||
290 | { | - | ||||||||||||||||||
291 | char *prompt_copy = | - | ||||||||||||||||||
292 | ((void *)0) | - | ||||||||||||||||||
293 | ; | - | ||||||||||||||||||
294 | - | |||||||||||||||||||
295 | if (prompt !=
| 0 | ||||||||||||||||||
296 | ((void *)0)
| 0 | ||||||||||||||||||
297 | ) { | - | ||||||||||||||||||
298 | prompt_copy = CRYPTO_strdup(prompt, __FILE__, 241); | - | ||||||||||||||||||
299 | if (prompt_copy ==
| 0 | ||||||||||||||||||
300 | ((void *)0)
| 0 | ||||||||||||||||||
301 | ) { | - | ||||||||||||||||||
302 | ERR_put_error(40,(106),((1|64)),__FILE__,243); | - | ||||||||||||||||||
303 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
304 | } | - | ||||||||||||||||||
305 | } never executed: end of block | 0 | ||||||||||||||||||
306 | - | |||||||||||||||||||
307 | return never executed: general_allocate_string(ui, prompt_copy, 1,return general_allocate_string(ui, prompt_copy, 1, UIT_VERIFY, flags, result_buf, minsize, maxsize, test_buf); never executed: return general_allocate_string(ui, prompt_copy, 1, UIT_VERIFY, flags, result_buf, minsize, maxsize, test_buf); | 0 | ||||||||||||||||||
308 | UIT_VERIFY, flags, result_buf, minsize, never executed: return general_allocate_string(ui, prompt_copy, 1, UIT_VERIFY, flags, result_buf, minsize, maxsize, test_buf); | 0 | ||||||||||||||||||
309 | maxsize, test_buf); never executed: return general_allocate_string(ui, prompt_copy, 1, UIT_VERIFY, flags, result_buf, minsize, maxsize, test_buf); | 0 | ||||||||||||||||||
310 | } | - | ||||||||||||||||||
311 | - | |||||||||||||||||||
312 | int UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc, | - | ||||||||||||||||||
313 | const char *ok_chars, const char *cancel_chars, | - | ||||||||||||||||||
314 | int flags, char *result_buf) | - | ||||||||||||||||||
315 | { | - | ||||||||||||||||||
316 | return never executed: general_allocate_boolean(ui, prompt, action_desc,return general_allocate_boolean(ui, prompt, action_desc, ok_chars, cancel_chars, 0, UIT_BOOLEAN, flags, result_buf); never executed: return general_allocate_boolean(ui, prompt, action_desc, ok_chars, cancel_chars, 0, UIT_BOOLEAN, flags, result_buf); | 0 | ||||||||||||||||||
317 | ok_chars, cancel_chars, 0, UIT_BOOLEAN, never executed: return general_allocate_boolean(ui, prompt, action_desc, ok_chars, cancel_chars, 0, UIT_BOOLEAN, flags, result_buf); | 0 | ||||||||||||||||||
318 | flags, result_buf); never executed: return general_allocate_boolean(ui, prompt, action_desc, ok_chars, cancel_chars, 0, UIT_BOOLEAN, flags, result_buf); | 0 | ||||||||||||||||||
319 | } | - | ||||||||||||||||||
320 | - | |||||||||||||||||||
321 | int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc, | - | ||||||||||||||||||
322 | const char *ok_chars, const char *cancel_chars, | - | ||||||||||||||||||
323 | int flags, char *result_buf) | - | ||||||||||||||||||
324 | { | - | ||||||||||||||||||
325 | char *prompt_copy = | - | ||||||||||||||||||
326 | ((void *)0) | - | ||||||||||||||||||
327 | ; | - | ||||||||||||||||||
328 | char *action_desc_copy = | - | ||||||||||||||||||
329 | ((void *)0) | - | ||||||||||||||||||
330 | ; | - | ||||||||||||||||||
331 | char *ok_chars_copy = | - | ||||||||||||||||||
332 | ((void *)0) | - | ||||||||||||||||||
333 | ; | - | ||||||||||||||||||
334 | char *cancel_chars_copy = | - | ||||||||||||||||||
335 | ((void *)0) | - | ||||||||||||||||||
336 | ; | - | ||||||||||||||||||
337 | - | |||||||||||||||||||
338 | if (prompt !=
| 0 | ||||||||||||||||||
339 | ((void *)0)
| 0 | ||||||||||||||||||
340 | ) { | - | ||||||||||||||||||
341 | prompt_copy = CRYPTO_strdup(prompt, __FILE__, 272); | - | ||||||||||||||||||
342 | if (prompt_copy ==
| 0 | ||||||||||||||||||
343 | ((void *)0)
| 0 | ||||||||||||||||||
344 | ) { | - | ||||||||||||||||||
345 | ERR_put_error(40,(110),((1|64)),__FILE__,274); | - | ||||||||||||||||||
346 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||
347 | } | - | ||||||||||||||||||
348 | } never executed: end of block | 0 | ||||||||||||||||||
349 | - | |||||||||||||||||||
350 | if (action_desc !=
| 0 | ||||||||||||||||||
351 | ((void *)0)
| 0 | ||||||||||||||||||
352 | ) { | - | ||||||||||||||||||
353 | action_desc_copy = CRYPTO_strdup(action_desc, __FILE__, 280); | - | ||||||||||||||||||
354 | if (action_desc_copy ==
| 0 | ||||||||||||||||||
355 | ((void *)0)
| 0 | ||||||||||||||||||
356 | ) { | - | ||||||||||||||||||
357 | ERR_put_error(40,(110),((1|64)),__FILE__,282); | - | ||||||||||||||||||
358 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||
359 | } | - | ||||||||||||||||||
360 | } never executed: end of block | 0 | ||||||||||||||||||
361 | - | |||||||||||||||||||
362 | if (ok_chars !=
| 0 | ||||||||||||||||||
363 | ((void *)0)
| 0 | ||||||||||||||||||
364 | ) { | - | ||||||||||||||||||
365 | ok_chars_copy = CRYPTO_strdup(ok_chars, __FILE__, 288); | - | ||||||||||||||||||
366 | if (ok_chars_copy ==
| 0 | ||||||||||||||||||
367 | ((void *)0)
| 0 | ||||||||||||||||||
368 | ) { | - | ||||||||||||||||||
369 | ERR_put_error(40,(110),((1|64)),__FILE__,290); | - | ||||||||||||||||||
370 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||
371 | } | - | ||||||||||||||||||
372 | } never executed: end of block | 0 | ||||||||||||||||||
373 | - | |||||||||||||||||||
374 | if (cancel_chars !=
| 0 | ||||||||||||||||||
375 | ((void *)0)
| 0 | ||||||||||||||||||
376 | ) { | - | ||||||||||||||||||
377 | cancel_chars_copy = CRYPTO_strdup(cancel_chars, __FILE__, 296); | - | ||||||||||||||||||
378 | if (cancel_chars_copy ==
| 0 | ||||||||||||||||||
379 | ((void *)0)
| 0 | ||||||||||||||||||
380 | ) { | - | ||||||||||||||||||
381 | ERR_put_error(40,(110),((1|64)),__FILE__,298); | - | ||||||||||||||||||
382 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||
383 | } | - | ||||||||||||||||||
384 | } never executed: end of block | 0 | ||||||||||||||||||
385 | - | |||||||||||||||||||
386 | return never executed: general_allocate_boolean(ui, prompt_copy, action_desc_copy,return general_allocate_boolean(ui, prompt_copy, action_desc_copy, ok_chars_copy, cancel_chars_copy, 1, UIT_BOOLEAN, flags, result_buf); never executed: return general_allocate_boolean(ui, prompt_copy, action_desc_copy, ok_chars_copy, cancel_chars_copy, 1, UIT_BOOLEAN, flags, result_buf); | 0 | ||||||||||||||||||
387 | ok_chars_copy, cancel_chars_copy, 1, never executed: return general_allocate_boolean(ui, prompt_copy, action_desc_copy, ok_chars_copy, cancel_chars_copy, 1, UIT_BOOLEAN, flags, result_buf); | 0 | ||||||||||||||||||
388 | UIT_BOOLEAN, flags, result_buf); never executed: return general_allocate_boolean(ui, prompt_copy, action_desc_copy, ok_chars_copy, cancel_chars_copy, 1, UIT_BOOLEAN, flags, result_buf); | 0 | ||||||||||||||||||
389 | err: | - | ||||||||||||||||||
390 | CRYPTO_free(prompt_copy, __FILE__, 307); | - | ||||||||||||||||||
391 | CRYPTO_free(action_desc_copy, __FILE__, 308); | - | ||||||||||||||||||
392 | CRYPTO_free(ok_chars_copy, __FILE__, 309); | - | ||||||||||||||||||
393 | CRYPTO_free(cancel_chars_copy, __FILE__, 310); | - | ||||||||||||||||||
394 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
395 | } | - | ||||||||||||||||||
396 | - | |||||||||||||||||||
397 | int UI_add_info_string(UI *ui, const char *text) | - | ||||||||||||||||||
398 | { | - | ||||||||||||||||||
399 | return never executed: general_allocate_string(ui, text, 0, UIT_INFO, 0, return general_allocate_string(ui, text, 0, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); never executed: return general_allocate_string(ui, text, 0, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
400 | ((void *)0) never executed: return general_allocate_string(ui, text, 0, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
401 | , 0, 0, never executed: return general_allocate_string(ui, text, 0, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
402 | never executed: return general_allocate_string(ui, text, 0, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
403 | ((void *)0) never executed: return general_allocate_string(ui, text, 0, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
404 | ); never executed: return general_allocate_string(ui, text, 0, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
405 | } | - | ||||||||||||||||||
406 | - | |||||||||||||||||||
407 | int UI_dup_info_string(UI *ui, const char *text) | - | ||||||||||||||||||
408 | { | - | ||||||||||||||||||
409 | char *text_copy = | - | ||||||||||||||||||
410 | ((void *)0) | - | ||||||||||||||||||
411 | ; | - | ||||||||||||||||||
412 | - | |||||||||||||||||||
413 | if (text !=
| 0 | ||||||||||||||||||
414 | ((void *)0)
| 0 | ||||||||||||||||||
415 | ) { | - | ||||||||||||||||||
416 | text_copy = CRYPTO_strdup(text, __FILE__, 325); | - | ||||||||||||||||||
417 | if (text_copy ==
| 0 | ||||||||||||||||||
418 | ((void *)0)
| 0 | ||||||||||||||||||
419 | ) { | - | ||||||||||||||||||
420 | ERR_put_error(40,(102),((1|64)),__FILE__,327); | - | ||||||||||||||||||
421 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
422 | } | - | ||||||||||||||||||
423 | } never executed: end of block | 0 | ||||||||||||||||||
424 | - | |||||||||||||||||||
425 | return never executed: general_allocate_string(ui, text_copy, 1, UIT_INFO, 0, return general_allocate_string(ui, text_copy, 1, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); never executed: return general_allocate_string(ui, text_copy, 1, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
426 | ((void *)0) never executed: return general_allocate_string(ui, text_copy, 1, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
427 | , never executed: return general_allocate_string(ui, text_copy, 1, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
428 | 0, 0, never executed: return general_allocate_string(ui, text_copy, 1, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
429 | ((void *)0) never executed: return general_allocate_string(ui, text_copy, 1, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
430 | ); never executed: return general_allocate_string(ui, text_copy, 1, UIT_INFO, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
431 | } | - | ||||||||||||||||||
432 | - | |||||||||||||||||||
433 | int UI_add_error_string(UI *ui, const char *text) | - | ||||||||||||||||||
434 | { | - | ||||||||||||||||||
435 | return never executed: general_allocate_string(ui, text, 0, UIT_ERROR, 0, return general_allocate_string(ui, text, 0, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); never executed: return general_allocate_string(ui, text, 0, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
436 | ((void *)0) never executed: return general_allocate_string(ui, text, 0, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
437 | , 0, 0, never executed: return general_allocate_string(ui, text, 0, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
438 | never executed: return general_allocate_string(ui, text, 0, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
439 | ((void *)0) never executed: return general_allocate_string(ui, text, 0, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
440 | ); never executed: return general_allocate_string(ui, text, 0, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
441 | } | - | ||||||||||||||||||
442 | - | |||||||||||||||||||
443 | int UI_dup_error_string(UI *ui, const char *text) | - | ||||||||||||||||||
444 | { | - | ||||||||||||||||||
445 | char *text_copy = | - | ||||||||||||||||||
446 | ((void *)0) | - | ||||||||||||||||||
447 | ; | - | ||||||||||||||||||
448 | - | |||||||||||||||||||
449 | if (text !=
| 0 | ||||||||||||||||||
450 | ((void *)0)
| 0 | ||||||||||||||||||
451 | ) { | - | ||||||||||||||||||
452 | text_copy = CRYPTO_strdup(text, __FILE__, 347); | - | ||||||||||||||||||
453 | if (text_copy ==
| 0 | ||||||||||||||||||
454 | ((void *)0)
| 0 | ||||||||||||||||||
455 | ) { | - | ||||||||||||||||||
456 | ERR_put_error(40,(101),((1|64)),__FILE__,349); | - | ||||||||||||||||||
457 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
458 | } | - | ||||||||||||||||||
459 | } never executed: end of block | 0 | ||||||||||||||||||
460 | return never executed: general_allocate_string(ui, text_copy, 1, UIT_ERROR, 0, return general_allocate_string(ui, text_copy, 1, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); never executed: return general_allocate_string(ui, text_copy, 1, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
461 | ((void *)0) never executed: return general_allocate_string(ui, text_copy, 1, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
462 | , never executed: return general_allocate_string(ui, text_copy, 1, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
463 | 0, 0, never executed: return general_allocate_string(ui, text_copy, 1, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
464 | ((void *)0) never executed: return general_allocate_string(ui, text_copy, 1, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
465 | ); never executed: return general_allocate_string(ui, text_copy, 1, UIT_ERROR, 0, ((void *)0) , 0, 0, ((void *)0) ); | 0 | ||||||||||||||||||
466 | } | - | ||||||||||||||||||
467 | - | |||||||||||||||||||
468 | char *UI_construct_prompt(UI *ui, const char *object_desc, | - | ||||||||||||||||||
469 | const char *object_name) | - | ||||||||||||||||||
470 | { | - | ||||||||||||||||||
471 | char *prompt = | - | ||||||||||||||||||
472 | ((void *)0) | - | ||||||||||||||||||
473 | ; | - | ||||||||||||||||||
474 | - | |||||||||||||||||||
475 | if (ui->meth->ui_construct_prompt !=
| 0-4 | ||||||||||||||||||
476 | ((void *)0)
| 0-4 | ||||||||||||||||||
477 | ) | - | ||||||||||||||||||
478 | prompt = ui->meth->ui_construct_prompt(ui, object_desc, object_name); never executed: prompt = ui->meth->ui_construct_prompt(ui, object_desc, object_name); | 0 | ||||||||||||||||||
479 | else { | - | ||||||||||||||||||
480 | char prompt1[] = "Enter "; | - | ||||||||||||||||||
481 | char prompt2[] = " for "; | - | ||||||||||||||||||
482 | char prompt3[] = ":"; | - | ||||||||||||||||||
483 | int len = 0; | - | ||||||||||||||||||
484 | - | |||||||||||||||||||
485 | if (object_desc ==
| 0-4 | ||||||||||||||||||
486 | ((void *)0)
| 0-4 | ||||||||||||||||||
487 | ) | - | ||||||||||||||||||
488 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
489 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
490 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
491 | len = sizeof(prompt1) - 1 + strlen(object_desc); | - | ||||||||||||||||||
492 | if (object_name !=
| 0-4 | ||||||||||||||||||
493 | ((void *)0)
| 0-4 | ||||||||||||||||||
494 | ) | - | ||||||||||||||||||
495 | len += sizeof(prompt2) - 1 + strlen(object_name); executed 4 times by 1 test: len += sizeof(prompt2) - 1 + strlen(object_name); Executed by:
| 4 | ||||||||||||||||||
496 | len += sizeof(prompt3) - 1; | - | ||||||||||||||||||
497 | - | |||||||||||||||||||
498 | if ((
| 0-4 | ||||||||||||||||||
499 | ((void *)0)
| 0-4 | ||||||||||||||||||
500 | ) { | - | ||||||||||||||||||
501 | ERR_put_error(40,(121),((1|64)),__FILE__,378); | - | ||||||||||||||||||
502 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
503 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
504 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
505 | } | - | ||||||||||||||||||
506 | OPENSSL_strlcpy(prompt, prompt1, len + 1); | - | ||||||||||||||||||
507 | OPENSSL_strlcat(prompt, object_desc, len + 1); | - | ||||||||||||||||||
508 | if (object_name !=
| 0-4 | ||||||||||||||||||
509 | ((void *)0)
| 0-4 | ||||||||||||||||||
510 | ) { | - | ||||||||||||||||||
511 | OPENSSL_strlcat(prompt, prompt2, len + 1); | - | ||||||||||||||||||
512 | OPENSSL_strlcat(prompt, object_name, len + 1); | - | ||||||||||||||||||
513 | } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||||||||||||||
514 | OPENSSL_strlcat(prompt, prompt3, len + 1); | - | ||||||||||||||||||
515 | } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||||||||||||||
516 | return executed 4 times by 1 test: prompt;return prompt; Executed by:
executed 4 times by 1 test: return prompt; Executed by:
| 4 | ||||||||||||||||||
517 | } | - | ||||||||||||||||||
518 | - | |||||||||||||||||||
519 | void *UI_add_user_data(UI *ui, void *user_data) | - | ||||||||||||||||||
520 | { | - | ||||||||||||||||||
521 | void *old_data = ui->user_data; | - | ||||||||||||||||||
522 | - | |||||||||||||||||||
523 | if ((
| 0-5 | ||||||||||||||||||
524 | ui->meth->ui_destroy_data(ui, old_data); | - | ||||||||||||||||||
525 | old_data = | - | ||||||||||||||||||
526 | ((void *)0) | - | ||||||||||||||||||
527 | ; | - | ||||||||||||||||||
528 | } never executed: end of block | 0 | ||||||||||||||||||
529 | ui->user_data = user_data; | - | ||||||||||||||||||
530 | ui->flags &= ~0x0002; | - | ||||||||||||||||||
531 | return executed 5 times by 1 test: old_data;return old_data; Executed by:
executed 5 times by 1 test: return old_data; Executed by:
| 5 | ||||||||||||||||||
532 | } | - | ||||||||||||||||||
533 | - | |||||||||||||||||||
534 | int UI_dup_user_data(UI *ui, void *user_data) | - | ||||||||||||||||||
535 | { | - | ||||||||||||||||||
536 | void *duplicate = | - | ||||||||||||||||||
537 | ((void *)0) | - | ||||||||||||||||||
538 | ; | - | ||||||||||||||||||
539 | - | |||||||||||||||||||
540 | if (ui->meth->ui_duplicate_data ==
| 0 | ||||||||||||||||||
541 | ((void *)0)
| 0 | ||||||||||||||||||
542 | - | |||||||||||||||||||
543 | || ui->meth->ui_destroy_data ==
| 0 | ||||||||||||||||||
544 | ((void *)0)
| 0 | ||||||||||||||||||
545 | ) { | - | ||||||||||||||||||
546 | ERR_put_error(40,(118),(112),__FILE__,411); | - | ||||||||||||||||||
547 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
548 | } | - | ||||||||||||||||||
549 | - | |||||||||||||||||||
550 | duplicate = ui->meth->ui_duplicate_data(ui, user_data); | - | ||||||||||||||||||
551 | if (duplicate ==
| 0 | ||||||||||||||||||
552 | ((void *)0)
| 0 | ||||||||||||||||||
553 | ) { | - | ||||||||||||||||||
554 | ERR_put_error(40,(118),((1|64)),__FILE__,417); | - | ||||||||||||||||||
555 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
556 | } | - | ||||||||||||||||||
557 | - | |||||||||||||||||||
558 | (void)UI_add_user_data(ui, duplicate); | - | ||||||||||||||||||
559 | ui->flags |= 0x0002; | - | ||||||||||||||||||
560 | - | |||||||||||||||||||
561 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
562 | } | - | ||||||||||||||||||
563 | - | |||||||||||||||||||
564 | void *UI_get0_user_data(UI *ui) | - | ||||||||||||||||||
565 | { | - | ||||||||||||||||||
566 | return executed 17 times by 1 test: ui->user_data;return ui->user_data; Executed by:
executed 17 times by 1 test: return ui->user_data; Executed by:
| 17 | ||||||||||||||||||
567 | } | - | ||||||||||||||||||
568 | - | |||||||||||||||||||
569 | const char *UI_get0_result(UI *ui, int i) | - | ||||||||||||||||||
570 | { | - | ||||||||||||||||||
571 | if (i < 0
| 0 | ||||||||||||||||||
572 | ERR_put_error(40,(107),(103),__FILE__,435); | - | ||||||||||||||||||
573 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
574 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
575 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
576 | } | - | ||||||||||||||||||
577 | if (i >= sk_UI_STRING_num(ui->strings)
| 0 | ||||||||||||||||||
578 | ERR_put_error(40,(107),(102),__FILE__,439); | - | ||||||||||||||||||
579 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
580 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
581 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
582 | } | - | ||||||||||||||||||
583 | return never executed: UI_get0_result_string(sk_UI_STRING_value(ui->strings, i));return UI_get0_result_string(sk_UI_STRING_value(ui->strings, i)); never executed: return UI_get0_result_string(sk_UI_STRING_value(ui->strings, i)); | 0 | ||||||||||||||||||
584 | } | - | ||||||||||||||||||
585 | - | |||||||||||||||||||
586 | int UI_get_result_length(UI *ui, int i) | - | ||||||||||||||||||
587 | { | - | ||||||||||||||||||
588 | if (i < 0
| 0 | ||||||||||||||||||
589 | ERR_put_error(40,(119),(103),__FILE__,448); | - | ||||||||||||||||||
590 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
591 | } | - | ||||||||||||||||||
592 | if (i >= sk_UI_STRING_num(ui->strings)
| 0 | ||||||||||||||||||
593 | ERR_put_error(40,(119),(102),__FILE__,452); | - | ||||||||||||||||||
594 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
595 | } | - | ||||||||||||||||||
596 | return never executed: UI_get_result_string_length(sk_UI_STRING_value(ui->strings, i));return UI_get_result_string_length(sk_UI_STRING_value(ui->strings, i)); never executed: return UI_get_result_string_length(sk_UI_STRING_value(ui->strings, i)); | 0 | ||||||||||||||||||
597 | } | - | ||||||||||||||||||
598 | - | |||||||||||||||||||
599 | static int print_error(const char *str, size_t len, UI *ui) | - | ||||||||||||||||||
600 | { | - | ||||||||||||||||||
601 | UI_STRING uis; | - | ||||||||||||||||||
602 | - | |||||||||||||||||||
603 | memset(&uis, 0, sizeof(uis)); | - | ||||||||||||||||||
604 | uis.type = UIT_ERROR; | - | ||||||||||||||||||
605 | uis.out_string = str; | - | ||||||||||||||||||
606 | - | |||||||||||||||||||
607 | if (ui->meth->ui_write_string !=
| 0 | ||||||||||||||||||
608 | ((void *)0)
| 0 | ||||||||||||||||||
609 | - | |||||||||||||||||||
610 | && ui->meth->ui_write_string(ui, &uis) <= 0
| 0 | ||||||||||||||||||
611 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
612 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
613 | } | - | ||||||||||||||||||
614 | - | |||||||||||||||||||
615 | int UI_process(UI *ui) | - | ||||||||||||||||||
616 | { | - | ||||||||||||||||||
617 | int i, ok = 0; | - | ||||||||||||||||||
618 | const char *state = "processing"; | - | ||||||||||||||||||
619 | - | |||||||||||||||||||
620 | if (ui->meth->ui_open_session !=
| 0-5 | ||||||||||||||||||
621 | ((void *)0)
| 0-5 | ||||||||||||||||||
622 | - | |||||||||||||||||||
623 | && ui->meth->ui_open_session(ui) <= 0
| 0-5 | ||||||||||||||||||
624 | state = "opening session"; | - | ||||||||||||||||||
625 | ok = -1; | - | ||||||||||||||||||
626 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||
627 | } | - | ||||||||||||||||||
628 | - | |||||||||||||||||||
629 | if (ui->flags & 0x0100
| 1-4 | ||||||||||||||||||
630 | ERR_print_errors_cb((int (*)(const char *, size_t, void *)) executed 4 times by 1 test: ERR_print_errors_cb((int (*)(const char *, size_t, void *)) print_error, (void *)ui); Executed by:
| 4 | ||||||||||||||||||
631 | print_error, (void *)ui); executed 4 times by 1 test: ERR_print_errors_cb((int (*)(const char *, size_t, void *)) print_error, (void *)ui); Executed by:
| 4 | ||||||||||||||||||
632 | - | |||||||||||||||||||
633 | for (i = 0; i < sk_UI_STRING_num(ui->strings)
| 5 | ||||||||||||||||||
634 | if (ui->meth->ui_write_string !=
| 0-5 | ||||||||||||||||||
635 | ((void *)0)
| 0-5 | ||||||||||||||||||
636 | - | |||||||||||||||||||
637 | && (
| 0-5 | ||||||||||||||||||
638 | sk_UI_STRING_value(ui->strings, i))
| 0-5 | ||||||||||||||||||
639 | <= 0)
| 0-5 | ||||||||||||||||||
640 | { | - | ||||||||||||||||||
641 | state = "writing strings"; | - | ||||||||||||||||||
642 | ok = -1; | - | ||||||||||||||||||
643 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||
644 | } | - | ||||||||||||||||||
645 | } executed 5 times by 1 test: end of block Executed by:
| 5 | ||||||||||||||||||
646 | - | |||||||||||||||||||
647 | if (ui->meth->ui_flush !=
| 0-5 | ||||||||||||||||||
648 | ((void *)0)
| 0-5 | ||||||||||||||||||
649 | ) | - | ||||||||||||||||||
650 | switch (ui->meth->ui_flush(ui)) { | - | ||||||||||||||||||
651 | case never executed: -1:case -1: never executed: case -1: | 0 | ||||||||||||||||||
652 | ok = -2; | - | ||||||||||||||||||
653 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||
654 | case never executed: 0:case 0: never executed: case 0: | 0 | ||||||||||||||||||
655 | state = "flushing"; | - | ||||||||||||||||||
656 | ok = -1; | - | ||||||||||||||||||
657 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||
658 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||
659 | ok = 0; | - | ||||||||||||||||||
660 | break; never executed: break; | 0 | ||||||||||||||||||
661 | } | - | ||||||||||||||||||
662 | - | |||||||||||||||||||
663 | for (i = 0; i < sk_UI_STRING_num(ui->strings)
| 5 | ||||||||||||||||||
664 | if (ui->meth->ui_read_string !=
| 0-5 | ||||||||||||||||||
665 | ((void *)0)
| 0-5 | ||||||||||||||||||
666 | ) { | - | ||||||||||||||||||
667 | switch (ui->meth->ui_read_string(ui, | - | ||||||||||||||||||
668 | sk_UI_STRING_value(ui->strings, | - | ||||||||||||||||||
669 | i))) { | - | ||||||||||||||||||
670 | case never executed: -1:case -1: never executed: case -1: | 0 | ||||||||||||||||||
671 | ok = -2; | - | ||||||||||||||||||
672 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||
673 | case never executed: 0:case 0: never executed: case 0: | 0 | ||||||||||||||||||
674 | state = "reading strings"; | - | ||||||||||||||||||
675 | ok = -1; | - | ||||||||||||||||||
676 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||
677 | default executed 5 times by 1 test: :default: Executed by:
executed 5 times by 1 test: default: Executed by:
| 5 | ||||||||||||||||||
678 | ok = 0; | - | ||||||||||||||||||
679 | break; executed 5 times by 1 test: break; Executed by:
| 5 | ||||||||||||||||||
680 | } | - | ||||||||||||||||||
681 | } | - | ||||||||||||||||||
682 | } executed 5 times by 1 test: end of block Executed by:
| 5 | ||||||||||||||||||
683 | - | |||||||||||||||||||
684 | state = | - | ||||||||||||||||||
685 | ((void *)0) | - | ||||||||||||||||||
686 | ; | - | ||||||||||||||||||
687 | err: code before this statement executed 5 times by 1 test: err: Executed by:
| 5 | ||||||||||||||||||
688 | if (ui->meth->ui_close_session !=
| 0-5 | ||||||||||||||||||
689 | ((void *)0)
| 0-5 | ||||||||||||||||||
690 | - | |||||||||||||||||||
691 | && ui->meth->ui_close_session(ui) <= 0
| 0-5 | ||||||||||||||||||
692 | if (state ==
| 0 | ||||||||||||||||||
693 | ((void *)0)
| 0 | ||||||||||||||||||
694 | ) | - | ||||||||||||||||||
695 | state = "closing session"; never executed: state = "closing session"; | 0 | ||||||||||||||||||
696 | ok = -1; | - | ||||||||||||||||||
697 | } never executed: end of block | 0 | ||||||||||||||||||
698 | - | |||||||||||||||||||
699 | if (ok == -1
| 0-5 | ||||||||||||||||||
700 | ERR_put_error(40,(113),(107),__FILE__,543); | - | ||||||||||||||||||
701 | ERR_add_error_data(2, "while ", state); | - | ||||||||||||||||||
702 | } never executed: end of block | 0 | ||||||||||||||||||
703 | return executed 5 times by 1 test: ok;return ok; Executed by:
executed 5 times by 1 test: return ok; Executed by:
| 5 | ||||||||||||||||||
704 | } | - | ||||||||||||||||||
705 | - | |||||||||||||||||||
706 | int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void)) | - | ||||||||||||||||||
707 | { | - | ||||||||||||||||||
708 | if (ui ==
| 0-4 | ||||||||||||||||||
709 | ((void *)0)
| 0-4 | ||||||||||||||||||
710 | ) { | - | ||||||||||||||||||
711 | ERR_put_error(40,(111),((3|64)),__FILE__,552); | - | ||||||||||||||||||
712 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
713 | } | - | ||||||||||||||||||
714 | switch (cmd) { | - | ||||||||||||||||||
715 | case executed 4 times by 1 test: 1:case 1: Executed by:
executed 4 times by 1 test: case 1: Executed by:
| 4 | ||||||||||||||||||
716 | { | - | ||||||||||||||||||
717 | int save_flag = ! !(ui->flags & 0x0100); | - | ||||||||||||||||||
718 | if (i
| 0-4 | ||||||||||||||||||
719 | ui->flags |= 0x0100; executed 4 times by 1 test: ui->flags |= 0x0100; Executed by:
| 4 | ||||||||||||||||||
720 | else | - | ||||||||||||||||||
721 | ui->flags &= ~0x0100; never executed: ui->flags &= ~0x0100; | 0 | ||||||||||||||||||
722 | return executed 4 times by 1 test: save_flag;return save_flag; Executed by:
executed 4 times by 1 test: return save_flag; Executed by:
| 4 | ||||||||||||||||||
723 | } | - | ||||||||||||||||||
724 | case never executed: 2:case 2: never executed: case 2: | 0 | ||||||||||||||||||
725 | return never executed: ! !(ui->flags & 0x0001);return ! !(ui->flags & 0x0001); never executed: return ! !(ui->flags & 0x0001); | 0 | ||||||||||||||||||
726 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||
727 | break; never executed: break; | 0 | ||||||||||||||||||
728 | } | - | ||||||||||||||||||
729 | ERR_put_error(40,(111),(106),__FILE__,570); | - | ||||||||||||||||||
730 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
731 | } | - | ||||||||||||||||||
732 | - | |||||||||||||||||||
733 | int UI_set_ex_data(UI *r, int idx, void *arg) | - | ||||||||||||||||||
734 | { | - | ||||||||||||||||||
735 | return never executed: CRYPTO_set_ex_data(&r->ex_data, idx, arg);return CRYPTO_set_ex_data(&r->ex_data, idx, arg); never executed: return CRYPTO_set_ex_data(&r->ex_data, idx, arg); | 0 | ||||||||||||||||||
736 | } | - | ||||||||||||||||||
737 | - | |||||||||||||||||||
738 | void *UI_get_ex_data(UI *r, int idx) | - | ||||||||||||||||||
739 | { | - | ||||||||||||||||||
740 | return never executed: CRYPTO_get_ex_data(&r->ex_data, idx);return CRYPTO_get_ex_data(&r->ex_data, idx); never executed: return CRYPTO_get_ex_data(&r->ex_data, idx); | 0 | ||||||||||||||||||
741 | } | - | ||||||||||||||||||
742 | - | |||||||||||||||||||
743 | const UI_METHOD *UI_get_method(UI *ui) | - | ||||||||||||||||||
744 | { | - | ||||||||||||||||||
745 | return executed 1 time by 1 test: ui->meth;return ui->meth; Executed by:
executed 1 time by 1 test: return ui->meth; Executed by:
| 1 | ||||||||||||||||||
746 | } | - | ||||||||||||||||||
747 | - | |||||||||||||||||||
748 | const UI_METHOD *UI_set_method(UI *ui, const UI_METHOD *meth) | - | ||||||||||||||||||
749 | { | - | ||||||||||||||||||
750 | ui->meth = meth; | - | ||||||||||||||||||
751 | return never executed: ui->meth;return ui->meth; never executed: return ui->meth; | 0 | ||||||||||||||||||
752 | } | - | ||||||||||||||||||
753 | - | |||||||||||||||||||
754 | UI_METHOD *UI_create_method(const char *name) | - | ||||||||||||||||||
755 | { | - | ||||||||||||||||||
756 | UI_METHOD *ui_method = | - | ||||||||||||||||||
757 | ((void *)0) | - | ||||||||||||||||||
758 | ; | - | ||||||||||||||||||
759 | - | |||||||||||||||||||
760 | if ((
| 0-1790 | ||||||||||||||||||
761 | ((void *)0)
| 0-1790 | ||||||||||||||||||
762 | - | |||||||||||||||||||
763 | || (
| 0-1790 | ||||||||||||||||||
764 | ((void *)0)
| 0-1790 | ||||||||||||||||||
765 | - | |||||||||||||||||||
766 | || !CRYPTO_new_ex_data(14, ui_method,
| 0-1790 | ||||||||||||||||||
767 | &ui_method->ex_data)
| 0-1790 | ||||||||||||||||||
768 | if (ui_method
| 0 | ||||||||||||||||||
769 | CRYPTO_free(ui_method->name, __FILE__, 604); never executed: CRYPTO_free(ui_method->name, __FILE__, 604); | 0 | ||||||||||||||||||
770 | CRYPTO_free(ui_method, __FILE__, 605); | - | ||||||||||||||||||
771 | ERR_put_error(40,(112),((1|64)),__FILE__,606); | - | ||||||||||||||||||
772 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
773 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
774 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
775 | } | - | ||||||||||||||||||
776 | return executed 1790 times by 1 test: ui_method;return ui_method; Executed by:
executed 1790 times by 1 test: return ui_method; Executed by:
| 1790 | ||||||||||||||||||
777 | } | - | ||||||||||||||||||
778 | - | |||||||||||||||||||
779 | - | |||||||||||||||||||
780 | - | |||||||||||||||||||
781 | - | |||||||||||||||||||
782 | - | |||||||||||||||||||
783 | - | |||||||||||||||||||
784 | void UI_destroy_method(UI_METHOD *ui_method) | - | ||||||||||||||||||
785 | { | - | ||||||||||||||||||
786 | if (ui_method ==
| 0-1790 | ||||||||||||||||||
787 | ((void *)0)
| 0-1790 | ||||||||||||||||||
788 | ) | - | ||||||||||||||||||
789 | return; never executed: return; | 0 | ||||||||||||||||||
790 | CRYPTO_free_ex_data(14, ui_method, | - | ||||||||||||||||||
791 | &ui_method->ex_data); | - | ||||||||||||||||||
792 | CRYPTO_free(ui_method->name, __FILE__, 623); | - | ||||||||||||||||||
793 | ui_method->name = | - | ||||||||||||||||||
794 | ((void *)0) | - | ||||||||||||||||||
795 | ; | - | ||||||||||||||||||
796 | CRYPTO_free(ui_method, __FILE__, 625); | - | ||||||||||||||||||
797 | } executed 1790 times by 1 test: end of block Executed by:
| 1790 | ||||||||||||||||||
798 | - | |||||||||||||||||||
799 | int UI_method_set_opener(UI_METHOD *method, int (*opener) (UI *ui)) | - | ||||||||||||||||||
800 | { | - | ||||||||||||||||||
801 | if (method !=
| 0-1790 | ||||||||||||||||||
802 | ((void *)0)
| 0-1790 | ||||||||||||||||||
803 | ) { | - | ||||||||||||||||||
804 | method->ui_open_session = opener; | - | ||||||||||||||||||
805 | return executed 1790 times by 1 test: 0;return 0; Executed by:
executed 1790 times by 1 test: return 0; Executed by:
| 1790 | ||||||||||||||||||
806 | } | - | ||||||||||||||||||
807 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
808 | } | - | ||||||||||||||||||
809 | - | |||||||||||||||||||
810 | int UI_method_set_writer(UI_METHOD *method, | - | ||||||||||||||||||
811 | int (*writer) (UI *ui, UI_STRING *uis)) | - | ||||||||||||||||||
812 | { | - | ||||||||||||||||||
813 | if (method !=
| 0-1790 | ||||||||||||||||||
814 | ((void *)0)
| 0-1790 | ||||||||||||||||||
815 | ) { | - | ||||||||||||||||||
816 | method->ui_write_string = writer; | - | ||||||||||||||||||
817 | return executed 1790 times by 1 test: 0;return 0; Executed by:
executed 1790 times by 1 test: return 0; Executed by:
| 1790 | ||||||||||||||||||
818 | } | - | ||||||||||||||||||
819 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
820 | } | - | ||||||||||||||||||
821 | - | |||||||||||||||||||
822 | int UI_method_set_flusher(UI_METHOD *method, int (*flusher) (UI *ui)) | - | ||||||||||||||||||
823 | { | - | ||||||||||||||||||
824 | if (method !=
| 0 | ||||||||||||||||||
825 | ((void *)0)
| 0 | ||||||||||||||||||
826 | ) { | - | ||||||||||||||||||
827 | method->ui_flush = flusher; | - | ||||||||||||||||||
828 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
829 | } | - | ||||||||||||||||||
830 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
831 | } | - | ||||||||||||||||||
832 | - | |||||||||||||||||||
833 | int UI_method_set_reader(UI_METHOD *method, | - | ||||||||||||||||||
834 | int (*reader) (UI *ui, UI_STRING *uis)) | - | ||||||||||||||||||
835 | { | - | ||||||||||||||||||
836 | if (method !=
| 0-1790 | ||||||||||||||||||
837 | ((void *)0)
| 0-1790 | ||||||||||||||||||
838 | ) { | - | ||||||||||||||||||
839 | method->ui_read_string = reader; | - | ||||||||||||||||||
840 | return executed 1790 times by 1 test: 0;return 0; Executed by:
executed 1790 times by 1 test: return 0; Executed by:
| 1790 | ||||||||||||||||||
841 | } | - | ||||||||||||||||||
842 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
843 | } | - | ||||||||||||||||||
844 | - | |||||||||||||||||||
845 | int UI_method_set_closer(UI_METHOD *method, int (*closer) (UI *ui)) | - | ||||||||||||||||||
846 | { | - | ||||||||||||||||||
847 | if (method !=
| 0-1790 | ||||||||||||||||||
848 | ((void *)0)
| 0-1790 | ||||||||||||||||||
849 | ) { | - | ||||||||||||||||||
850 | method->ui_close_session = closer; | - | ||||||||||||||||||
851 | return executed 1790 times by 1 test: 0;return 0; Executed by:
executed 1790 times by 1 test: return 0; Executed by:
| 1790 | ||||||||||||||||||
852 | } | - | ||||||||||||||||||
853 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
854 | } | - | ||||||||||||||||||
855 | - | |||||||||||||||||||
856 | int UI_method_set_data_duplicator(UI_METHOD *method, | - | ||||||||||||||||||
857 | void *(*duplicator) (UI *ui, void *ui_data), | - | ||||||||||||||||||
858 | void (*destructor)(UI *ui, void *ui_data)) | - | ||||||||||||||||||
859 | { | - | ||||||||||||||||||
860 | if (method !=
| 0 | ||||||||||||||||||
861 | ((void *)0)
| 0 | ||||||||||||||||||
862 | ) { | - | ||||||||||||||||||
863 | method->ui_duplicate_data = duplicator; | - | ||||||||||||||||||
864 | method->ui_destroy_data = destructor; | - | ||||||||||||||||||
865 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
866 | } | - | ||||||||||||||||||
867 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
868 | } | - | ||||||||||||||||||
869 | - | |||||||||||||||||||
870 | int UI_method_set_prompt_constructor(UI_METHOD *method, | - | ||||||||||||||||||
871 | char *(*prompt_constructor) (UI *ui, | - | ||||||||||||||||||
872 | const char | - | ||||||||||||||||||
873 | *object_desc, | - | ||||||||||||||||||
874 | const char | - | ||||||||||||||||||
875 | *object_name)) | - | ||||||||||||||||||
876 | { | - | ||||||||||||||||||
877 | if (method !=
| 0 | ||||||||||||||||||
878 | ((void *)0)
| 0 | ||||||||||||||||||
879 | ) { | - | ||||||||||||||||||
880 | method->ui_construct_prompt = prompt_constructor; | - | ||||||||||||||||||
881 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
882 | } | - | ||||||||||||||||||
883 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
884 | } | - | ||||||||||||||||||
885 | - | |||||||||||||||||||
886 | int UI_method_set_ex_data(UI_METHOD *method, int idx, void *data) | - | ||||||||||||||||||
887 | { | - | ||||||||||||||||||
888 | return executed 1 time by 1 test: CRYPTO_set_ex_data(&method->ex_data, idx, data);return CRYPTO_set_ex_data(&method->ex_data, idx, data); Executed by:
executed 1 time by 1 test: return CRYPTO_set_ex_data(&method->ex_data, idx, data); Executed by:
| 1 | ||||||||||||||||||
889 | } | - | ||||||||||||||||||
890 | - | |||||||||||||||||||
891 | int (*UI_method_get_opener(const UI_METHOD *method)) (UI *) | - | ||||||||||||||||||
892 | { | - | ||||||||||||||||||
893 | if (method !=
| 0-4 | ||||||||||||||||||
894 | ((void *)0)
| 0-4 | ||||||||||||||||||
895 | ) | - | ||||||||||||||||||
896 | return executed 4 times by 1 test: method->ui_open_session;return method->ui_open_session; Executed by:
executed 4 times by 1 test: return method->ui_open_session; Executed by:
| 4 | ||||||||||||||||||
897 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
898 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
899 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
900 | } | - | ||||||||||||||||||
901 | - | |||||||||||||||||||
902 | int (*UI_method_get_writer(const UI_METHOD *method)) (UI *, UI_STRING *) | - | ||||||||||||||||||
903 | { | - | ||||||||||||||||||
904 | if (method !=
| 0 | ||||||||||||||||||
905 | ((void *)0)
| 0 | ||||||||||||||||||
906 | ) | - | ||||||||||||||||||
907 | return never executed: method->ui_write_string;return method->ui_write_string; never executed: return method->ui_write_string; | 0 | ||||||||||||||||||
908 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
909 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
910 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
911 | } | - | ||||||||||||||||||
912 | - | |||||||||||||||||||
913 | int (*UI_method_get_flusher(const UI_METHOD *method)) (UI *) | - | ||||||||||||||||||
914 | { | - | ||||||||||||||||||
915 | if (method !=
| 0 | ||||||||||||||||||
916 | ((void *)0)
| 0 | ||||||||||||||||||
917 | ) | - | ||||||||||||||||||
918 | return never executed: method->ui_flush;return method->ui_flush; never executed: return method->ui_flush; | 0 | ||||||||||||||||||
919 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
920 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
921 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
922 | } | - | ||||||||||||||||||
923 | - | |||||||||||||||||||
924 | int (*UI_method_get_reader(const UI_METHOD *method)) (UI *, UI_STRING *) | - | ||||||||||||||||||
925 | { | - | ||||||||||||||||||
926 | if (method !=
| 0 | ||||||||||||||||||
927 | ((void *)0)
| 0 | ||||||||||||||||||
928 | ) | - | ||||||||||||||||||
929 | return never executed: method->ui_read_string;return method->ui_read_string; never executed: return method->ui_read_string; | 0 | ||||||||||||||||||
930 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
931 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
932 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
933 | } | - | ||||||||||||||||||
934 | - | |||||||||||||||||||
935 | int (*UI_method_get_closer(const UI_METHOD *method)) (UI *) | - | ||||||||||||||||||
936 | { | - | ||||||||||||||||||
937 | if (method !=
| 0-4 | ||||||||||||||||||
938 | ((void *)0)
| 0-4 | ||||||||||||||||||
939 | ) | - | ||||||||||||||||||
940 | return executed 4 times by 1 test: method->ui_close_session;return method->ui_close_session; Executed by:
executed 4 times by 1 test: return method->ui_close_session; Executed by:
| 4 | ||||||||||||||||||
941 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
942 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
943 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
944 | } | - | ||||||||||||||||||
945 | - | |||||||||||||||||||
946 | char *(*UI_method_get_prompt_constructor(const UI_METHOD *method)) | - | ||||||||||||||||||
947 | (UI *, const char *, const char *) | - | ||||||||||||||||||
948 | { | - | ||||||||||||||||||
949 | if (method !=
| 0 | ||||||||||||||||||
950 | ((void *)0)
| 0 | ||||||||||||||||||
951 | ) | - | ||||||||||||||||||
952 | return never executed: method->ui_construct_prompt;return method->ui_construct_prompt; never executed: return method->ui_construct_prompt; | 0 | ||||||||||||||||||
953 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
954 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
955 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
956 | } | - | ||||||||||||||||||
957 | - | |||||||||||||||||||
958 | void *(*UI_method_get_data_duplicator(const UI_METHOD *method)) (UI *, void *) | - | ||||||||||||||||||
959 | { | - | ||||||||||||||||||
960 | if (method !=
| 0 | ||||||||||||||||||
961 | ((void *)0)
| 0 | ||||||||||||||||||
962 | ) | - | ||||||||||||||||||
963 | return never executed: method->ui_duplicate_data;return method->ui_duplicate_data; never executed: return method->ui_duplicate_data; | 0 | ||||||||||||||||||
964 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
965 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
966 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
967 | } | - | ||||||||||||||||||
968 | - | |||||||||||||||||||
969 | void (*UI_method_get_data_destructor(const UI_METHOD *method)) (UI *, void *) | - | ||||||||||||||||||
970 | { | - | ||||||||||||||||||
971 | if (method !=
| 0 | ||||||||||||||||||
972 | ((void *)0)
| 0 | ||||||||||||||||||
973 | ) | - | ||||||||||||||||||
974 | return never executed: method->ui_destroy_data;return method->ui_destroy_data; never executed: return method->ui_destroy_data; | 0 | ||||||||||||||||||
975 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
976 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
977 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
978 | } | - | ||||||||||||||||||
979 | - | |||||||||||||||||||
980 | const void *UI_method_get_ex_data(const UI_METHOD *method, int idx) | - | ||||||||||||||||||
981 | { | - | ||||||||||||||||||
982 | return executed 1 time by 1 test: CRYPTO_get_ex_data(&method->ex_data, idx);return CRYPTO_get_ex_data(&method->ex_data, idx); Executed by:
executed 1 time by 1 test: return CRYPTO_get_ex_data(&method->ex_data, idx); Executed by:
| 1 | ||||||||||||||||||
983 | } | - | ||||||||||||||||||
984 | - | |||||||||||||||||||
985 | enum UI_string_types UI_get_string_type(UI_STRING *uis) | - | ||||||||||||||||||
986 | { | - | ||||||||||||||||||
987 | return executed 9 times by 1 test: uis->type;return uis->type; Executed by:
executed 9 times by 1 test: return uis->type; Executed by:
| 9 | ||||||||||||||||||
988 | } | - | ||||||||||||||||||
989 | - | |||||||||||||||||||
990 | int UI_get_input_flags(UI_STRING *uis) | - | ||||||||||||||||||
991 | { | - | ||||||||||||||||||
992 | return executed 8 times by 1 test: uis->input_flags;return uis->input_flags; Executed by:
executed 8 times by 1 test: return uis->input_flags; Executed by:
| 8 | ||||||||||||||||||
993 | } | - | ||||||||||||||||||
994 | - | |||||||||||||||||||
995 | const char *UI_get0_output_string(UI_STRING *uis) | - | ||||||||||||||||||
996 | { | - | ||||||||||||||||||
997 | return never executed: uis->out_string;return uis->out_string; never executed: return uis->out_string; | 0 | ||||||||||||||||||
998 | } | - | ||||||||||||||||||
999 | - | |||||||||||||||||||
1000 | const char *UI_get0_action_string(UI_STRING *uis) | - | ||||||||||||||||||
1001 | { | - | ||||||||||||||||||
1002 | switch (uis->type) { | - | ||||||||||||||||||
1003 | case never executed: UIT_BOOLEAN:case UIT_BOOLEAN: never executed: case UIT_BOOLEAN: | 0 | ||||||||||||||||||
1004 | return never executed: uis->_.boolean_data.action_desc;return uis->_.boolean_data.action_desc; never executed: return uis->_.boolean_data.action_desc; | 0 | ||||||||||||||||||
1005 | case never executed: UIT_PROMPT:case UIT_PROMPT: never executed: case UIT_PROMPT: | 0 | ||||||||||||||||||
1006 | case never executed: UIT_NONE:case UIT_NONE: never executed: case UIT_NONE: | 0 | ||||||||||||||||||
1007 | case never executed: UIT_VERIFY:case UIT_VERIFY: never executed: case UIT_VERIFY: | 0 | ||||||||||||||||||
1008 | case never executed: UIT_INFO:case UIT_INFO: never executed: case UIT_INFO: | 0 | ||||||||||||||||||
1009 | case never executed: UIT_ERROR:case UIT_ERROR: never executed: case UIT_ERROR: | 0 | ||||||||||||||||||
1010 | break; never executed: break; | 0 | ||||||||||||||||||
1011 | } | - | ||||||||||||||||||
1012 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
1013 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
1014 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
1015 | } | - | ||||||||||||||||||
1016 | - | |||||||||||||||||||
1017 | const char *UI_get0_result_string(UI_STRING *uis) | - | ||||||||||||||||||
1018 | { | - | ||||||||||||||||||
1019 | switch (uis->type) { | - | ||||||||||||||||||
1020 | case never executed: UIT_PROMPT:case UIT_PROMPT: never executed: case UIT_PROMPT: | 0 | ||||||||||||||||||
1021 | case never executed: UIT_VERIFY:case UIT_VERIFY: never executed: case UIT_VERIFY: | 0 | ||||||||||||||||||
1022 | return never executed: uis->result_buf;return uis->result_buf; never executed: return uis->result_buf; | 0 | ||||||||||||||||||
1023 | case never executed: UIT_NONE:case UIT_NONE: never executed: case UIT_NONE: | 0 | ||||||||||||||||||
1024 | case never executed: UIT_BOOLEAN:case UIT_BOOLEAN: never executed: case UIT_BOOLEAN: | 0 | ||||||||||||||||||
1025 | case never executed: UIT_INFO:case UIT_INFO: never executed: case UIT_INFO: | 0 | ||||||||||||||||||
1026 | case never executed: UIT_ERROR:case UIT_ERROR: never executed: case UIT_ERROR: | 0 | ||||||||||||||||||
1027 | break; never executed: break; | 0 | ||||||||||||||||||
1028 | } | - | ||||||||||||||||||
1029 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
1030 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
1031 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
1032 | } | - | ||||||||||||||||||
1033 | - | |||||||||||||||||||
1034 | int UI_get_result_string_length(UI_STRING *uis) | - | ||||||||||||||||||
1035 | { | - | ||||||||||||||||||
1036 | switch (uis->type) { | - | ||||||||||||||||||
1037 | case never executed: UIT_PROMPT:case UIT_PROMPT: never executed: case UIT_PROMPT: | 0 | ||||||||||||||||||
1038 | case never executed: UIT_VERIFY:case UIT_VERIFY: never executed: case UIT_VERIFY: | 0 | ||||||||||||||||||
1039 | return never executed: uis->result_len;return uis->result_len; never executed: return uis->result_len; | 0 | ||||||||||||||||||
1040 | case never executed: UIT_NONE:case UIT_NONE: never executed: case UIT_NONE: | 0 | ||||||||||||||||||
1041 | case never executed: UIT_BOOLEAN:case UIT_BOOLEAN: never executed: case UIT_BOOLEAN: | 0 | ||||||||||||||||||
1042 | case never executed: UIT_INFO:case UIT_INFO: never executed: case UIT_INFO: | 0 | ||||||||||||||||||
1043 | case never executed: UIT_ERROR:case UIT_ERROR: never executed: case UIT_ERROR: | 0 | ||||||||||||||||||
1044 | break; never executed: break; | 0 | ||||||||||||||||||
1045 | } | - | ||||||||||||||||||
1046 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
1047 | } | - | ||||||||||||||||||
1048 | - | |||||||||||||||||||
1049 | const char *UI_get0_test_string(UI_STRING *uis) | - | ||||||||||||||||||
1050 | { | - | ||||||||||||||||||
1051 | switch (uis->type) { | - | ||||||||||||||||||
1052 | case never executed: UIT_VERIFY:case UIT_VERIFY: never executed: case UIT_VERIFY: | 0 | ||||||||||||||||||
1053 | return never executed: uis->_.string_data.test_buf;return uis->_.string_data.test_buf; never executed: return uis->_.string_data.test_buf; | 0 | ||||||||||||||||||
1054 | case never executed: UIT_NONE:case UIT_NONE: never executed: case UIT_NONE: | 0 | ||||||||||||||||||
1055 | case never executed: UIT_BOOLEAN:case UIT_BOOLEAN: never executed: case UIT_BOOLEAN: | 0 | ||||||||||||||||||
1056 | case never executed: UIT_INFO:case UIT_INFO: never executed: case UIT_INFO: | 0 | ||||||||||||||||||
1057 | case never executed: UIT_ERROR:case UIT_ERROR: never executed: case UIT_ERROR: | 0 | ||||||||||||||||||
1058 | case never executed: UIT_PROMPT:case UIT_PROMPT: never executed: case UIT_PROMPT: | 0 | ||||||||||||||||||
1059 | break; never executed: break; | 0 | ||||||||||||||||||
1060 | } | - | ||||||||||||||||||
1061 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
1062 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
1063 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||
1064 | } | - | ||||||||||||||||||
1065 | - | |||||||||||||||||||
1066 | int UI_get_result_minsize(UI_STRING *uis) | - | ||||||||||||||||||
1067 | { | - | ||||||||||||||||||
1068 | switch (uis->type) { | - | ||||||||||||||||||
1069 | case never executed: UIT_PROMPT:case UIT_PROMPT: never executed: case UIT_PROMPT: | 0 | ||||||||||||||||||
1070 | case never executed: UIT_VERIFY:case UIT_VERIFY: never executed: case UIT_VERIFY: | 0 | ||||||||||||||||||
1071 | return never executed: uis->_.string_data.result_minsize;return uis->_.string_data.result_minsize; never executed: return uis->_.string_data.result_minsize; | 0 | ||||||||||||||||||
1072 | case never executed: UIT_NONE:case UIT_NONE: never executed: case UIT_NONE: | 0 | ||||||||||||||||||
1073 | case never executed: UIT_INFO:case UIT_INFO: never executed: case UIT_INFO: | 0 | ||||||||||||||||||
1074 | case never executed: UIT_ERROR:case UIT_ERROR: never executed: case UIT_ERROR: | 0 | ||||||||||||||||||
1075 | case never executed: UIT_BOOLEAN:case UIT_BOOLEAN: never executed: case UIT_BOOLEAN: | 0 | ||||||||||||||||||
1076 | break; never executed: break; | 0 | ||||||||||||||||||
1077 | } | - | ||||||||||||||||||
1078 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
1079 | } | - | ||||||||||||||||||
1080 | - | |||||||||||||||||||
1081 | int UI_get_result_maxsize(UI_STRING *uis) | - | ||||||||||||||||||
1082 | { | - | ||||||||||||||||||
1083 | switch (uis->type) { | - | ||||||||||||||||||
1084 | case executed 1 time by 1 test: UIT_PROMPT:case UIT_PROMPT: Executed by:
executed 1 time by 1 test: case UIT_PROMPT: Executed by:
| 1 | ||||||||||||||||||
1085 | case never executed: UIT_VERIFY:case UIT_VERIFY: never executed: case UIT_VERIFY: | 0 | ||||||||||||||||||
1086 | return executed 1 time by 1 test: uis->_.string_data.result_maxsize;return uis->_.string_data.result_maxsize; Executed by:
executed 1 time by 1 test: return uis->_.string_data.result_maxsize; Executed by:
| 1 | ||||||||||||||||||
1087 | case never executed: UIT_NONE:case UIT_NONE: never executed: case UIT_NONE: | 0 | ||||||||||||||||||
1088 | case never executed: UIT_INFO:case UIT_INFO: never executed: case UIT_INFO: | 0 | ||||||||||||||||||
1089 | case never executed: UIT_ERROR:case UIT_ERROR: never executed: case UIT_ERROR: | 0 | ||||||||||||||||||
1090 | case never executed: UIT_BOOLEAN:case UIT_BOOLEAN: never executed: case UIT_BOOLEAN: | 0 | ||||||||||||||||||
1091 | break; never executed: break; | 0 | ||||||||||||||||||
1092 | } | - | ||||||||||||||||||
1093 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
1094 | } | - | ||||||||||||||||||
1095 | - | |||||||||||||||||||
1096 | int UI_set_result(UI *ui, UI_STRING *uis, const char *result) | - | ||||||||||||||||||
1097 | { | - | ||||||||||||||||||
1098 | - | |||||||||||||||||||
1099 | - | |||||||||||||||||||
1100 | - | |||||||||||||||||||
1101 | - | |||||||||||||||||||
1102 | - | |||||||||||||||||||
1103 | - | |||||||||||||||||||
1104 | - | |||||||||||||||||||
1105 | return executed 4 times by 1 test: UI_set_result_ex(ui, uis, result, strlen(result));return UI_set_result_ex(ui, uis, result, strlen(result)); Executed by:
executed 4 times by 1 test: return UI_set_result_ex(ui, uis, result, strlen(result)); Executed by:
| 4 | ||||||||||||||||||
1106 | } | - | ||||||||||||||||||
1107 | - | |||||||||||||||||||
1108 | int UI_set_result_ex(UI *ui, UI_STRING *uis, const char *result, int len) | - | ||||||||||||||||||
1109 | { | - | ||||||||||||||||||
1110 | ui->flags &= ~0x0001; | - | ||||||||||||||||||
1111 | - | |||||||||||||||||||
1112 | switch (uis->type) { | - | ||||||||||||||||||
1113 | case executed 5 times by 1 test: UIT_PROMPT:case UIT_PROMPT: Executed by:
executed 5 times by 1 test: case UIT_PROMPT: Executed by:
| 5 | ||||||||||||||||||
1114 | case never executed: UIT_VERIFY:case UIT_VERIFY: never executed: case UIT_VERIFY: | 0 | ||||||||||||||||||
1115 | { | - | ||||||||||||||||||
1116 | char number1[((sizeof(uis->_.string_data.result_minsize)*8+2)/3+1) + 1]; | - | ||||||||||||||||||
1117 | char number2[((sizeof(uis->_.string_data.result_maxsize)*8+2)/3+1) + 1]; | - | ||||||||||||||||||
1118 | - | |||||||||||||||||||
1119 | BIO_snprintf(number1, sizeof(number1), "%d", | - | ||||||||||||||||||
1120 | uis->_.string_data.result_minsize); | - | ||||||||||||||||||
1121 | BIO_snprintf(number2, sizeof(number2), "%d", | - | ||||||||||||||||||
1122 | uis->_.string_data.result_maxsize); | - | ||||||||||||||||||
1123 | - | |||||||||||||||||||
1124 | if (len < uis->_.string_data.result_minsize
| 0-5 | ||||||||||||||||||
1125 | ui->flags |= 0x0001; | - | ||||||||||||||||||
1126 | ERR_put_error(40,(120),(101),__FILE__,903); | - | ||||||||||||||||||
1127 | ERR_add_error_data(5, "You must type in ", | - | ||||||||||||||||||
1128 | number1, " to ", number2, " characters"); | - | ||||||||||||||||||
1129 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
1130 | } | - | ||||||||||||||||||
1131 | if (len > uis->_.string_data.result_maxsize
| 0-5 | ||||||||||||||||||
1132 | ui->flags |= 0x0001; | - | ||||||||||||||||||
1133 | ERR_put_error(40,(120),(100),__FILE__,910); | - | ||||||||||||||||||
1134 | ERR_add_error_data(5, "You must type in ", | - | ||||||||||||||||||
1135 | number1, " to ", number2, " characters"); | - | ||||||||||||||||||
1136 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
1137 | } | - | ||||||||||||||||||
1138 | } | - | ||||||||||||||||||
1139 | - | |||||||||||||||||||
1140 | if (uis->result_buf ==
| 0-5 | ||||||||||||||||||
1141 | ((void *)0)
| 0-5 | ||||||||||||||||||
1142 | ) { | - | ||||||||||||||||||
1143 | ERR_put_error(40,(120),(105),__FILE__,918); | - | ||||||||||||||||||
1144 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
1145 | } | - | ||||||||||||||||||
1146 | - | |||||||||||||||||||
1147 | memcpy(uis->result_buf, result, len); | - | ||||||||||||||||||
1148 | if (len <= uis->_.string_data.result_maxsize
| 0-5 | ||||||||||||||||||
1149 | uis->result_buf[len] = '\0'; executed 5 times by 1 test: uis->result_buf[len] = '\0'; Executed by:
| 5 | ||||||||||||||||||
1150 | uis->result_len = len; | - | ||||||||||||||||||
1151 | break; executed 5 times by 1 test: break; Executed by:
| 5 | ||||||||||||||||||
1152 | case never executed: UIT_BOOLEAN:case UIT_BOOLEAN: never executed: case UIT_BOOLEAN: | 0 | ||||||||||||||||||
1153 | { | - | ||||||||||||||||||
1154 | const char *p; | - | ||||||||||||||||||
1155 | - | |||||||||||||||||||
1156 | if (uis->result_buf ==
| 0 | ||||||||||||||||||
1157 | ((void *)0)
| 0 | ||||||||||||||||||
1158 | ) { | - | ||||||||||||||||||
1159 | ERR_put_error(40,(120),(105),__FILE__,932); | - | ||||||||||||||||||
1160 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||
1161 | } | - | ||||||||||||||||||
1162 | - | |||||||||||||||||||
1163 | uis->result_buf[0] = '\0'; | - | ||||||||||||||||||
1164 | for (p = result; *
| 0 | ||||||||||||||||||
1165 | if ( | - | ||||||||||||||||||
1166 | (
| 0 | ||||||||||||||||||
1167 | *p
| 0 | ||||||||||||||||||
1168 | )
| 0 | ||||||||||||||||||
1169 | uis->_.boolean_data.ok_chars
| 0 | ||||||||||||||||||
1170 | )
| 0 | ||||||||||||||||||
1171 | *p
| 0 | ||||||||||||||||||
1172 | ) == '\0'
| 0 | ||||||||||||||||||
1173 | uis->_.boolean_data.ok_chars
| 0 | ||||||||||||||||||
1174 | ,
| 0 | ||||||||||||||||||
1175 | *p
| 0 | ||||||||||||||||||
1176 | ) : __builtin_strchr (
| 0 | ||||||||||||||||||
1177 | uis->_.boolean_data.ok_chars
| 0 | ||||||||||||||||||
1178 | ,
| 0 | ||||||||||||||||||
1179 | *p
| 0 | ||||||||||||||||||
1180 | )))
| 0 | ||||||||||||||||||
1181 | ) { | - | ||||||||||||||||||
1182 | uis->result_buf[0] = uis->_.boolean_data.ok_chars[0]; | - | ||||||||||||||||||
1183 | break; never executed: break; | 0 | ||||||||||||||||||
1184 | } | - | ||||||||||||||||||
1185 | if ( | - | ||||||||||||||||||
1186 | (
| 0 | ||||||||||||||||||
1187 | *p
| 0 | ||||||||||||||||||
1188 | )
| 0 | ||||||||||||||||||
1189 | uis->_.boolean_data.cancel_chars
| 0 | ||||||||||||||||||
1190 | )
| 0 | ||||||||||||||||||
1191 | *p
| 0 | ||||||||||||||||||
1192 | ) == '\0'
| 0 | ||||||||||||||||||
1193 | uis->_.boolean_data.cancel_chars
| 0 | ||||||||||||||||||
1194 | ,
| 0 | ||||||||||||||||||
1195 | *p
| 0 | ||||||||||||||||||
1196 | ) : __builtin_strchr (
| 0 | ||||||||||||||||||
1197 | uis->_.boolean_data.cancel_chars
| 0 | ||||||||||||||||||
1198 | ,
| 0 | ||||||||||||||||||
1199 | *p
| 0 | ||||||||||||||||||
1200 | )))
| 0 | ||||||||||||||||||
1201 | ) { | - | ||||||||||||||||||
1202 | uis->result_buf[0] = uis->_.boolean_data.cancel_chars[0]; | - | ||||||||||||||||||
1203 | break; never executed: break; | 0 | ||||||||||||||||||
1204 | } | - | ||||||||||||||||||
1205 | } never executed: end of block | 0 | ||||||||||||||||||
1206 | } | - | ||||||||||||||||||
1207 | case never executed: UIT_NONE:case UIT_NONE: never executed: case UIT_NONE: code before this statement never executed: case UIT_NONE: | 0 | ||||||||||||||||||
1208 | case never executed: UIT_INFO:case UIT_INFO: never executed: case UIT_INFO: | 0 | ||||||||||||||||||
1209 | case never executed: UIT_ERROR:case UIT_ERROR: never executed: case UIT_ERROR: | 0 | ||||||||||||||||||
1210 | break; never executed: break; | 0 | ||||||||||||||||||
1211 | } | - | ||||||||||||||||||
1212 | return executed 5 times by 1 test: 0;return 0; Executed by:
executed 5 times by 1 test: return 0; Executed by:
| 5 | ||||||||||||||||||
1213 | } | - | ||||||||||||||||||
Switch to Source code | Preprocessed file |