Line | Source | Count |
1 | | - |
2 | | - |
3 | static void value_free_hash(const CONF_VALUE *a, struct lhash_st_CONF_VALUE *conf); | - |
4 | static void value_free_stack_doall(CONF_VALUE *a); | - |
5 | | - |
6 | | - |
7 | CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section) | - |
8 | { | - |
9 | CONF_VALUE *v, vv; | - |
10 | | - |
11 | if ((TRUE | never evaluated | FALSE | evaluated 40177 times by 1 test |
conf == TRUE | never evaluated | FALSE | evaluated 40177 times by 1 test |
| 0-40177 |
12 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 40177 times by 1 test |
| 0-40177 |
13 | )TRUE | never evaluated | FALSE | evaluated 40177 times by 1 test |
|| (TRUE | never evaluated | FALSE | evaluated 40177 times by 1 test |
section == TRUE | never evaluated | FALSE | evaluated 40177 times by 1 test |
| 0-40177 |
14 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 40177 times by 1 test |
| 0-40177 |
15 | )TRUE | never evaluated | FALSE | evaluated 40177 times by 1 test |
) | 0-40177 |
16 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
17 | ((void *)0) never executed: return ((void *)0) ; | 0 |
18 | ; never executed: return ((void *)0) ; | 0 |
19 | vv.name = | - |
20 | ((void *)0) | - |
21 | ; | - |
22 | vv.section = (char *)section; | - |
23 | v = lh_CONF_VALUE_retrieve(conf->data, &vv); | - |
24 | returnexecuted 40177 times by 1 test: return v; v;executed 40177 times by 1 test: return v; | 40177 |
25 | } | - |
26 | | - |
27 | | - |
28 | struct stack_st_CONF_VALUE *_CONF_get_section_values(const CONF *conf, | - |
29 | const char *section) | - |
30 | { | - |
31 | CONF_VALUE *v; | - |
32 | | - |
33 | v = _CONF_get_section(conf, section); | - |
34 | if (v != TRUE | evaluated 6085 times by 1 test | FALSE | never evaluated |
| 0-6085 |
35 | ((void *)0)TRUE | evaluated 6085 times by 1 test | FALSE | never evaluated |
| 0-6085 |
36 | ) | - |
37 | returnexecuted 6085 times by 1 test: return ((struct stack_st_CONF_VALUE *)v->value); ((struct stack_st_CONF_VALUE *)v->value);executed 6085 times by 1 test: return ((struct stack_st_CONF_VALUE *)v->value); | 6085 |
38 | else | - |
39 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
40 | ((void *)0) never executed: return ((void *)0) ; | 0 |
41 | ; never executed: return ((void *)0) ; | 0 |
42 | } | - |
43 | | - |
44 | int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value) | - |
45 | { | - |
46 | CONF_VALUE *v = | - |
47 | ((void *)0) | - |
48 | ; | - |
49 | struct stack_st_CONF_VALUE *ts; | - |
50 | | - |
51 | ts = (struct stack_st_CONF_VALUE *)section->value; | - |
52 | | - |
53 | value->section = section->section; | - |
54 | if (!sk_CONF_VALUE_push(ts, value)TRUE | never evaluated | FALSE | evaluated 86981 times by 1 test |
) { | 0-86981 |
55 | return never executed: return 0; 0;never executed: return 0; | 0 |
56 | } | - |
57 | | - |
58 | v = lh_CONF_VALUE_insert(conf->data, value); | - |
59 | if (v != TRUE | evaluated 12854 times by 1 test | FALSE | evaluated 74127 times by 1 test |
| 12854-74127 |
60 | ((void *)0)TRUE | evaluated 12854 times by 1 test | FALSE | evaluated 74127 times by 1 test |
| 12854-74127 |
61 | ) { | - |
62 | (void)sk_CONF_VALUE_delete_ptr(ts, v); | - |
63 | CRYPTO_free(v->name, __FILE__, 62); | - |
64 | CRYPTO_free(v->value, __FILE__, 63); | - |
65 | CRYPTO_free(v, __FILE__, 64); | - |
66 | }executed 12854 times by 1 test: end of block | 12854 |
67 | returnexecuted 86981 times by 1 test: return 1; 1;executed 86981 times by 1 test: return 1; | 86981 |
68 | } | - |
69 | | - |
70 | char *_CONF_get_string(const CONF *conf, const char *section, | - |
71 | const char *name) | - |
72 | { | - |
73 | CONF_VALUE *v, vv; | - |
74 | char *p; | - |
75 | | - |
76 | if (name == TRUE | never evaluated | FALSE | evaluated 45451 times by 1 test |
| 0-45451 |
77 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 45451 times by 1 test |
| 0-45451 |
78 | ) | - |
79 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
80 | ((void *)0) never executed: return ((void *)0) ; | 0 |
81 | ; never executed: return ((void *)0) ; | 0 |
82 | if (conf != TRUE | evaluated 45451 times by 1 test | FALSE | never evaluated |
| 0-45451 |
83 | ((void *)0)TRUE | evaluated 45451 times by 1 test | FALSE | never evaluated |
| 0-45451 |
84 | ) { | - |
85 | if (section != TRUE | evaluated 42591 times by 1 test | FALSE | evaluated 2860 times by 1 test |
| 2860-42591 |
86 | ((void *)0)TRUE | evaluated 42591 times by 1 test | FALSE | evaluated 2860 times by 1 test |
| 2860-42591 |
87 | ) { | - |
88 | vv.name = (char *)name; | - |
89 | vv.section = (char *)section; | - |
90 | v = lh_CONF_VALUE_retrieve(conf->data, &vv); | - |
91 | if (v != TRUE | evaluated 34885 times by 1 test | FALSE | evaluated 7706 times by 1 test |
| 7706-34885 |
92 | ((void *)0)TRUE | evaluated 34885 times by 1 test | FALSE | evaluated 7706 times by 1 test |
| 7706-34885 |
93 | ) | - |
94 | returnexecuted 34885 times by 1 test: return v->value; v->value;executed 34885 times by 1 test: return v->value; | 34885 |
95 | if ( | - |
96 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
97 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
98 | ) && __builtin_constant_p (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
99 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
100 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
101 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
102 | ), __s2_len = __builtin_strlen (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
103 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
104 | ), (!((size_t)(const void *)((TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
105 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
106 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
107 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
108 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
109 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
110 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
111 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
112 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
113 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
114 | , TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
115 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
116 | ) : (__builtin_constant_p (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
117 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
118 | ) && ((size_t)(const void *)((TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
119 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
120 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
121 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
122 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
123 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
124 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
125 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
126 | ) && ((size_t)(const void *)((TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
127 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
128 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
129 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
130 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
131 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
132 | , TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
133 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
134 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
135 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
136 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
137 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
138 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 0-4783 |
139 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
140 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 0-4783 |
141 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
142 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( section ))[3] - __s2[3]); TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 0-4783 |
143 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( section ))[3] - __s2[3]); | 0-4783 |
144 | ))[3] - __s2[3]);TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( section ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 0-4783 |
145 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
146 | ) && ((size_t)(const void *)((TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
147 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
148 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
149 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
150 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
151 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
152 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
153 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
154 | ) && ((size_t)(const void *)((TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
155 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
156 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
157 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
158 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
159 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
160 | , TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
161 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
162 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
163 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
164 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
165 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
166 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | evaluated 7706 times by 1 test | FALSE | never evaluated |
&& __result == 0TRUE | evaluated 6338 times by 1 test | FALSE | evaluated 1368 times by 1 test |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 0-7706 |
167 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
168 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | evaluated 6338 times by 1 test | FALSE | never evaluated |
&& __result == 0TRUE | evaluated 6224 times by 1 test | FALSE | evaluated 114 times by 1 test |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 0-6338 |
169 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
170 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | evaluated 6224 times by 1 test | FALSE | never evaluated |
&& __result == 0TRUE | evaluated 5591 times by 1 test | FALSE | evaluated 633 times by 1 test |
) __result = (((const unsigned char *) (const char *) (executed 5591 times by 1 test: __result = (((const unsigned char *) (const char *) ( "ENV" ))[3] - __s2[3]); | 0-6224 |
171 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
executed 5591 times by 1 test: __result = (((const unsigned char *) (const char *) ( "ENV" ))[3] - __s2[3]); | 2923-5591 |
172 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-6338 |
173 | sectionTRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
174 | , TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
175 | "ENV"TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
176 | )))); }) TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
| 2923-4783 |
177 | == 0TRUE | evaluated 4783 times by 1 test | FALSE | evaluated 2923 times by 1 test |
) { | 2923-4783 |
178 | p = getenv(name); | - |
179 | if (p != TRUE | evaluated 4135 times by 1 test | FALSE | evaluated 648 times by 1 test |
| 648-4135 |
180 | ((void *)0)TRUE | evaluated 4135 times by 1 test | FALSE | evaluated 648 times by 1 test |
| 648-4135 |
181 | ) | - |
182 | returnexecuted 4135 times by 1 test: return p; p;executed 4135 times by 1 test: return p; | 4135 |
183 | }executed 648 times by 1 test: end of block | 648 |
184 | }executed 3571 times by 1 test: end of block | 3571 |
185 | vv.section = "default"; | - |
186 | vv.name = (char *)name; | - |
187 | v = lh_CONF_VALUE_retrieve(conf->data, &vv); | - |
188 | if (v != TRUE | evaluated 6010 times by 1 test | FALSE | evaluated 421 times by 1 test |
| 421-6010 |
189 | ((void *)0)TRUE | evaluated 6010 times by 1 test | FALSE | evaluated 421 times by 1 test |
| 421-6010 |
190 | ) | - |
191 | returnexecuted 6010 times by 1 test: return v->value; v->value;executed 6010 times by 1 test: return v->value; | 6010 |
192 | else | - |
193 | returnexecuted 421 times by 1 test: return ((void *)0) ; executed 421 times by 1 test: return ((void *)0) ; | 421 |
194 | ((void *)0)executed 421 times by 1 test: return ((void *)0) ; | 421 |
195 | ;executed 421 times by 1 test: return ((void *)0) ; | 421 |
196 | } else | - |
197 | return never executed: return getenv(name); getenv(name);never executed: return getenv(name); | 0 |
198 | } | - |
199 | | - |
200 | static unsigned long conf_value_hash(const CONF_VALUE *v) | - |
201 | { | - |
202 | returnexecuted 283523 times by 1 test: return (OPENSSL_LH_strhash(v->section) << 2) ^ OPENSSL_LH_strhash(v->name); (OPENSSL_LH_strhash(v->section) << 2) ^ OPENSSL_LH_strhash(v->name);executed 283523 times by 1 test: return (OPENSSL_LH_strhash(v->section) << 2) ^ OPENSSL_LH_strhash(v->name); | 283523 |
203 | } | - |
204 | | - |
205 | static int conf_value_cmp(const CONF_VALUE *a, const CONF_VALUE *b) | - |
206 | { | - |
207 | int i; | - |
208 | | - |
209 | if (a->section != b->sectionTRUE | evaluated 58577 times by 1 test | FALSE | evaluated 104233 times by 1 test |
) { | 58577-104233 |
210 | i = | - |
211 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( | - |
212 | a->section | - |
213 | ) && __builtin_constant_p ( | - |
214 | b->section | - |
215 | ) && (__s1_len = __builtin_strlen ( | - |
216 | a->section | - |
217 | ), __s2_len = __builtin_strlen ( | - |
218 | b->section | - |
219 | ), (!((size_t)(const void *)(( | - |
220 | a->section | - |
221 | ) + 1) - (size_t)(const void *)( | - |
222 | a->section | - |
223 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(( | - |
224 | b->section | - |
225 | ) + 1) - (size_t)(const void *)( | - |
226 | b->section | - |
227 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp ( | - |
228 | a->section | - |
229 | , | - |
230 | b->section | - |
231 | ) : (__builtin_constant_p ( | - |
232 | a->section | - |
233 | ) && ((size_t)(const void *)(( | - |
234 | a->section | - |
235 | ) + 1) - (size_t)(const void *)( | - |
236 | a->section | - |
237 | ) == 1) && (__s1_len = __builtin_strlen ( | - |
238 | a->section | - |
239 | ), __s1_len < 4) ? (__builtin_constant_p ( | - |
240 | b->section | - |
241 | ) && ((size_t)(const void *)(( | - |
242 | b->section | - |
243 | ) + 1) - (size_t)(const void *)( | - |
244 | b->section | - |
245 | ) == 1) ? __builtin_strcmp ( | - |
246 | a->section | - |
247 | , | - |
248 | b->section | - |
249 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ( | - |
250 | b->section | - |
251 | ); int __result = (((const unsigned char *) (const char *) ( | - |
252 | a->section | - |
253 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
254 | a->section | - |
255 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
256 | a->section | - |
257 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( a->section ))[3] - __s2[3]); | 0 |
258 | a->section never executed: __result = (((const unsigned char *) (const char *) ( a->section ))[3] - __s2[3]); | 0 |
259 | ))[3] - __s2[3]); never executed: __result = (((const unsigned char *) (const char *) ( a->section ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p ( | 0 |
260 | b->section | - |
261 | ) && ((size_t)(const void *)(( | - |
262 | b->section | - |
263 | ) + 1) - (size_t)(const void *)( | - |
264 | b->section | - |
265 | ) == 1) && (__s2_len = __builtin_strlen ( | - |
266 | b->section | - |
267 | ), __s2_len < 4) ? (__builtin_constant_p ( | - |
268 | a->section | - |
269 | ) && ((size_t)(const void *)(( | - |
270 | a->section | - |
271 | ) + 1) - (size_t)(const void *)( | - |
272 | a->section | - |
273 | ) == 1) ? __builtin_strcmp ( | - |
274 | a->section | - |
275 | , | - |
276 | b->section | - |
277 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ( | - |
278 | a->section | - |
279 | ); int __result = (((const unsigned char *) (const char *) ( | - |
280 | b->section | - |
281 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
282 | b->section | - |
283 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
284 | b->section | - |
285 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( b->section ))[3] - __s2[3]); | 0 |
286 | b->section never executed: __result = (((const unsigned char *) (const char *) ( b->section ))[3] - __s2[3]); | 0 |
287 | ))[3] - __s2[3]); never executed: __result = (((const unsigned char *) (const char *) ( b->section ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp ( | 0 |
288 | a->section | - |
289 | , | - |
290 | b->section | - |
291 | )))); }) | - |
292 | ; | - |
293 | if (iTRUE | evaluated 586 times by 1 test | FALSE | evaluated 57991 times by 1 test |
) | 586-57991 |
294 | returnexecuted 586 times by 1 test: return i; i;executed 586 times by 1 test: return i; | 586 |
295 | }executed 57991 times by 1 test: end of block | 57991 |
296 | | - |
297 | if ((TRUE | evaluated 129026 times by 1 test | FALSE | evaluated 33198 times by 1 test |
a->name != TRUE | evaluated 129026 times by 1 test | FALSE | evaluated 33198 times by 1 test |
| 33198-129026 |
298 | ((void *)0)TRUE | evaluated 129026 times by 1 test | FALSE | evaluated 33198 times by 1 test |
| 33198-129026 |
299 | )TRUE | evaluated 129026 times by 1 test | FALSE | evaluated 33198 times by 1 test |
&& (TRUE | evaluated 128360 times by 1 test | FALSE | evaluated 666 times by 1 test |
b->name != TRUE | evaluated 128360 times by 1 test | FALSE | evaluated 666 times by 1 test |
| 666-129026 |
300 | ((void *)0)TRUE | evaluated 128360 times by 1 test | FALSE | evaluated 666 times by 1 test |
| 666-128360 |
301 | )TRUE | evaluated 128360 times by 1 test | FALSE | evaluated 666 times by 1 test |
) { | 666-128360 |
302 | i = | - |
303 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( | - |
304 | a->name | - |
305 | ) && __builtin_constant_p ( | - |
306 | b->name | - |
307 | ) && (__s1_len = __builtin_strlen ( | - |
308 | a->name | - |
309 | ), __s2_len = __builtin_strlen ( | - |
310 | b->name | - |
311 | ), (!((size_t)(const void *)(( | - |
312 | a->name | - |
313 | ) + 1) - (size_t)(const void *)( | - |
314 | a->name | - |
315 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(( | - |
316 | b->name | - |
317 | ) + 1) - (size_t)(const void *)( | - |
318 | b->name | - |
319 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp ( | - |
320 | a->name | - |
321 | , | - |
322 | b->name | - |
323 | ) : (__builtin_constant_p ( | - |
324 | a->name | - |
325 | ) && ((size_t)(const void *)(( | - |
326 | a->name | - |
327 | ) + 1) - (size_t)(const void *)( | - |
328 | a->name | - |
329 | ) == 1) && (__s1_len = __builtin_strlen ( | - |
330 | a->name | - |
331 | ), __s1_len < 4) ? (__builtin_constant_p ( | - |
332 | b->name | - |
333 | ) && ((size_t)(const void *)(( | - |
334 | b->name | - |
335 | ) + 1) - (size_t)(const void *)( | - |
336 | b->name | - |
337 | ) == 1) ? __builtin_strcmp ( | - |
338 | a->name | - |
339 | , | - |
340 | b->name | - |
341 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ( | - |
342 | b->name | - |
343 | ); int __result = (((const unsigned char *) (const char *) ( | - |
344 | a->name | - |
345 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
346 | a->name | - |
347 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
348 | a->name | - |
349 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( a->name ))[3] - __s2[3]); | 0 |
350 | a->name never executed: __result = (((const unsigned char *) (const char *) ( a->name ))[3] - __s2[3]); | 0 |
351 | ))[3] - __s2[3]); never executed: __result = (((const unsigned char *) (const char *) ( a->name ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p ( | 0 |
352 | b->name | - |
353 | ) && ((size_t)(const void *)(( | - |
354 | b->name | - |
355 | ) + 1) - (size_t)(const void *)( | - |
356 | b->name | - |
357 | ) == 1) && (__s2_len = __builtin_strlen ( | - |
358 | b->name | - |
359 | ), __s2_len < 4) ? (__builtin_constant_p ( | - |
360 | a->name | - |
361 | ) && ((size_t)(const void *)(( | - |
362 | a->name | - |
363 | ) + 1) - (size_t)(const void *)( | - |
364 | a->name | - |
365 | ) == 1) ? __builtin_strcmp ( | - |
366 | a->name | - |
367 | , | - |
368 | b->name | - |
369 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ( | - |
370 | a->name | - |
371 | ); int __result = (((const unsigned char *) (const char *) ( | - |
372 | b->name | - |
373 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
374 | b->name | - |
375 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
376 | b->name | - |
377 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( b->name ))[3] - __s2[3]); | 0 |
378 | b->name never executed: __result = (((const unsigned char *) (const char *) ( b->name ))[3] - __s2[3]); | 0 |
379 | ))[3] - __s2[3]); never executed: __result = (((const unsigned char *) (const char *) ( b->name ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp ( | 0 |
380 | a->name | - |
381 | , | - |
382 | b->name | - |
383 | )))); }) | - |
384 | ; | - |
385 | returnexecuted 128360 times by 1 test: return i; i;executed 128360 times by 1 test: return i; | 128360 |
386 | } else if (a->name == b->nameTRUE | evaluated 9111 times by 1 test | FALSE | evaluated 24753 times by 1 test |
) | 9111-24753 |
387 | returnexecuted 9111 times by 1 test: return 0; 0;executed 9111 times by 1 test: return 0; | 9111 |
388 | else | - |
389 | returnexecuted 24753 times by 1 test: return ((a->name == ((void *)0) ) ? -1 : 1); ((TRUE | evaluated 24087 times by 1 test | FALSE | evaluated 666 times by 1 test |
a->name == TRUE | evaluated 24087 times by 1 test | FALSE | evaluated 666 times by 1 test |
executed 24753 times by 1 test: return ((a->name == ((void *)0) ) ? -1 : 1); | 666-24753 |
390 | ((void *)0)TRUE | evaluated 24087 times by 1 test | FALSE | evaluated 666 times by 1 test |
executed 24753 times by 1 test: return ((a->name == ((void *)0) ) ? -1 : 1); | 666-24753 |
391 | )TRUE | evaluated 24087 times by 1 test | FALSE | evaluated 666 times by 1 test |
? -1 : 1);executed 24753 times by 1 test: return ((a->name == ((void *)0) ) ? -1 : 1); | 666-24753 |
392 | } | - |
393 | | - |
394 | int _CONF_new_data(CONF *conf) | - |
395 | { | - |
396 | if (conf == TRUE | never evaluated | FALSE | evaluated 2150 times by 1 test |
| 0-2150 |
397 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 2150 times by 1 test |
| 0-2150 |
398 | ) { | - |
399 | return never executed: return 0; 0;never executed: return 0; | 0 |
400 | } | - |
401 | if (conf->data == TRUE | evaluated 2150 times by 1 test | FALSE | never evaluated |
| 0-2150 |
402 | ((void *)0)TRUE | evaluated 2150 times by 1 test | FALSE | never evaluated |
| 0-2150 |
403 | ) { | - |
404 | conf->data = lh_CONF_VALUE_new(conf_value_hash, conf_value_cmp); | - |
405 | if (conf->data == TRUE | never evaluated | FALSE | evaluated 2150 times by 1 test |
| 0-2150 |
406 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 2150 times by 1 test |
| 0-2150 |
407 | ) | - |
408 | return never executed: return 0; 0;never executed: return 0; | 0 |
409 | }executed 2150 times by 1 test: end of block | 2150 |
410 | returnexecuted 2150 times by 1 test: return 1; 1;executed 2150 times by 1 test: return 1; | 2150 |
411 | } | - |
412 | | - |
413 | typedef struct lhash_st_CONF_VALUE LH_CONF_VALUE; | - |
414 | | - |
415 | static inline void lh_CONF_VALUE_doall_LH_CONF_VALUE(struct lhash_st_CONF_VALUE *lh, void (*fn)(const CONF_VALUE *, LH_CONF_VALUE *), LH_CONF_VALUE *arg) { OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNCARG)fn, (void *)arg); }executed 2150 times by 1 test: end of block struct lhash_st_CONF_VALUE; | 2150 |
416 | | - |
417 | void _CONF_free_data(CONF *conf) | - |
418 | { | - |
419 | if (conf == TRUE | never evaluated | FALSE | evaluated 4468 times by 1 test |
| 0-4468 |
420 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 4468 times by 1 test |
| 0-4468 |
421 | || conf->data == TRUE | evaluated 2318 times by 1 test | FALSE | evaluated 2150 times by 1 test |
| 2150-2318 |
422 | ((void *)0)TRUE | evaluated 2318 times by 1 test | FALSE | evaluated 2150 times by 1 test |
| 2150-2318 |
423 | ) | - |
424 | return;executed 2318 times by 1 test: return; | 2318 |
425 | | - |
426 | | - |
427 | lh_CONF_VALUE_set_down_load(conf->data, 0); | - |
428 | lh_CONF_VALUE_doall_LH_CONF_VALUE(conf->data, value_free_hash, conf->data); | - |
429 | | - |
430 | | - |
431 | | - |
432 | | - |
433 | | - |
434 | | - |
435 | lh_CONF_VALUE_doall(conf->data, value_free_stack_doall); | - |
436 | lh_CONF_VALUE_free(conf->data); | - |
437 | }executed 2150 times by 1 test: end of block | 2150 |
438 | | - |
439 | static void value_free_hash(const CONF_VALUE *a, struct lhash_st_CONF_VALUE *conf) | - |
440 | { | - |
441 | if (a->name != TRUE | evaluated 74127 times by 1 test | FALSE | evaluated 33216 times by 1 test |
| 33216-74127 |
442 | ((void *)0)TRUE | evaluated 74127 times by 1 test | FALSE | evaluated 33216 times by 1 test |
| 33216-74127 |
443 | ) | - |
444 | (executed 74127 times by 1 test: (void)lh_CONF_VALUE_delete(conf, a); void)lh_CONF_VALUE_delete(conf, a);executed 74127 times by 1 test: (void)lh_CONF_VALUE_delete(conf, a); | 74127 |
445 | }executed 107343 times by 1 test: end of block | 107343 |
446 | | - |
447 | static void value_free_stack_doall(CONF_VALUE *a) | - |
448 | { | - |
449 | CONF_VALUE *vv; | - |
450 | struct stack_st_CONF_VALUE *sk; | - |
451 | int i; | - |
452 | | - |
453 | if (a->name != TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
| 0-33216 |
454 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
| 0-33216 |
455 | ) | - |
456 | return; never executed: return; | 0 |
457 | | - |
458 | sk = (struct stack_st_CONF_VALUE *)a->value; | - |
459 | for (i = sk_CONF_VALUE_num(sk) - 1; i >= 0TRUE | evaluated 74127 times by 1 test | FALSE | evaluated 33216 times by 1 test |
; i--) { | 33216-74127 |
460 | vv = sk_CONF_VALUE_value(sk, i); | - |
461 | CRYPTO_free(vv->value, __FILE__, 178); | - |
462 | CRYPTO_free(vv->name, __FILE__, 179); | - |
463 | CRYPTO_free(vv, __FILE__, 180); | - |
464 | }executed 74127 times by 1 test: end of block | 74127 |
465 | sk_CONF_VALUE_free(sk); | - |
466 | CRYPTO_free(a->section, __FILE__, 183); | - |
467 | CRYPTO_free(a, __FILE__, 184); | - |
468 | }executed 33216 times by 1 test: end of block | 33216 |
469 | | - |
470 | | - |
471 | CONF_VALUE *_CONF_new_section(CONF *conf, const char *section) | - |
472 | { | - |
473 | struct stack_st_CONF_VALUE *sk = | - |
474 | ((void *)0) | - |
475 | ; | - |
476 | int i; | - |
477 | CONF_VALUE *v = | - |
478 | ((void *)0) | - |
479 | , *vv; | - |
480 | | - |
481 | if ((TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
sk = sk_CONF_VALUE_new_null()) == TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
| 0-33216 |
482 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
| 0-33216 |
483 | ) | - |
484 | goto never executed: goto err; err;never executed: goto err; | 0 |
485 | if ((TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
v = CRYPTO_malloc(sizeof(*v), __FILE__, 196)) == TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
| 0-33216 |
486 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
| 0-33216 |
487 | ) | - |
488 | goto never executed: goto err; err;never executed: goto err; | 0 |
489 | i = strlen(section) + 1; | - |
490 | if ((TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
v->section = CRYPTO_malloc(i, __FILE__, 199)) == TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
| 0-33216 |
491 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
| 0-33216 |
492 | ) | - |
493 | goto never executed: goto err; err;never executed: goto err; | 0 |
494 | | - |
495 | memcpy(v->section, section, i); | - |
496 | v->name = | - |
497 | ((void *)0) | - |
498 | ; | - |
499 | v->value = (char *)sk; | - |
500 | | - |
501 | vv = lh_CONF_VALUE_insert(conf->data, v); | - |
502 | if (vv != TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
| 0-33216 |
503 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
| 0-33216 |
504 | || lh_CONF_VALUE_error(conf->data) > 0TRUE | never evaluated | FALSE | evaluated 33216 times by 1 test |
) | 0-33216 |
505 | goto never executed: goto err; err;never executed: goto err; | 0 |
506 | returnexecuted 33216 times by 1 test: return v; v;executed 33216 times by 1 test: return v; | 33216 |
507 | | - |
508 | err: | - |
509 | sk_CONF_VALUE_free(sk); | - |
510 | if (v != TRUE | never evaluated | FALSE | never evaluated |
| 0 |
511 | ((void *)0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
512 | ) | - |
513 | CRYPTO_free(v->section, __FILE__, 214); never executed: CRYPTO_free(v->section, __FILE__, 214); | 0 |
514 | CRYPTO_free(v, __FILE__, 215); | - |
515 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
516 | ((void *)0) never executed: return ((void *)0) ; | 0 |
517 | ; never executed: return ((void *)0) ; | 0 |
518 | } | - |
| | |