Debian Codegraph @

src/OVAL/oval_component.c

raw symbols SCIP
1 /**
2 * @file oval_component.c
3 * \brief Open Vulnerability and Assessment Language
4 *
5 * See more details at http://oval.mitre.org/
6 */
7
8 /*
9 * Copyright 2009--2013 Red Hat Inc., Durham, North Carolina.
10 * All Rights Reserved.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 *
26 * Authors:
27 * "David Niemoller" <[email protected]>
28 * "Peter Vrabec" <[email protected]>
29 * "Tomas Heinrich" <[email protected]>
30 * "Daniel Kopecek" <[email protected]>
31 */
32
33 #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:409:9`!
34 #include <config.h>cxx . . $ `<file>/build/config.h`/
35 #endif
36
37 #include <stdlib.h>
38 #include <stdio.h>
39 #include <string.h>
40 #include <time.h>
41 #include <stdbool.h>
42 #include <sys/types.h>
43
44 #include "oval_definitions_impl.h"cxx . . $ `<file>/src/OVAL/oval_definitions_impl.h`/
45 #include "adt/oval_collection_impl.h"cxx . . $ `<file>/src/OVAL/adt/oval_collection_impl.h`/
46 #include "adt/oval_string_map_impl.h"cxx . . $ `<file>/src/OVAL/adt/oval_string_map_impl.h`/
47 #include "oval_agent_api_impl.h"cxx . . $ `<file>/src/OVAL/oval_agent_api_impl.h`/
48 #include "oval_parser_impl.h"cxx . . $ `<file>/src/OVAL/oval_parser_impl.h`/
49 #if defined(OVAL_PROBES_ENABLEDcxx . . $ `build/config.h:67:9`!)
50 #include "oval_probe.h"cxx . . $ `<file>/src/OVAL/public/oval_probe.h`/
51 #include "oval_probe_session.h"cxx . . $ `<file>/src/OVAL/public/oval_probe_session.h`/
52 #include "oval_probe_impl.h"cxx . . $ `<file>/src/OVAL/oval_probe_impl.h`/
53 #endif
54 #include "common/util.h"cxx . . $ `<file>/src/common/util.h`/
55 #include "common/debug_priv.h"cxx . . $ `<file>/src/common/debug_priv.h`/
56 #include "common/_error.h"cxx . . $ `<file>/src/common/_error.h`/
57 #include "common/oscap_string.h"cxx . . $ `<file>/src/common/oscap_string.h`/
58 #include "common/oscap_pcre.h"cxx . . $ `<file>/src/common/oscap_pcre.h`/
59 #include "oval_glob_to_regex.h"cxx . . $ `<file>/src/OVAL/oval_glob_to_regex.h`/
60
61 #if !defined(OVAL_PROBES_ENABLEDcxx . . $ `build/config.h:67:9`!)
62 const char *oval_subtype_to_str(oval_subtype_t subtype);
63 #endif
64
65 /***************************************************************************/
66 /* Variable definitions
67 * */
68
69 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _flag_agg_mapcxx . . $ _flag_agg_map.[7][7] = {
70 {SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN., SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.,
71 SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE., SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.,
72 SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST., SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.,
73 SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.},
74
75 {SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR., SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.,
76 SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR., SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.,
77 SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR., SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.,
78 SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.},
79
80 {SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE., SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.,
81 SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE., SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.,
82 SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST., SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.,
83 SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.},
84
85 {SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE., SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.,
86 SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE., SYSCHAR_FLAG_INCOMPLETEcxx . . $ SYSCHAR_FLAG_INCOMPLETE.,
87 SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST., SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.,
88 SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.},
89
90 {SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST., SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.,
91 SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST., SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST.,
92 SYSCHAR_FLAG_DOES_NOT_EXISTcxx . . $ SYSCHAR_FLAG_DOES_NOT_EXIST., SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.,
93 SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.},
94
95 {SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED., SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.,
96 SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED., SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.,
97 SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED., SYSCHAR_FLAG_NOT_COLLECTEDcxx . . $ SYSCHAR_FLAG_NOT_COLLECTED.,
98 SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.},
99
100 {SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE., SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.,
101 SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE., SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.,
102 SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE., SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.,
103 SYSCHAR_FLAG_NOT_APPLICABLEcxx . . $ SYSCHAR_FLAG_NOT_APPLICABLE.},
104 };
105
106 #define _AGG_FLAGcxx . . $ `src/OVAL/oval_component.c:106:9`!(f1, f2) _flag_agg_map[f2][f1]
107 #define _COMP_TYPEcxx . . $ `src/OVAL/oval_component.c:107:9`!(comp) oval_component_type_get_text(oval_component_get_type(comp))
108 #define _FLAG_TYPEcxx . . $ `src/OVAL/oval_component.c:108:9`!(flag) oval_syschar_collection_flag_get_text(flag)
109
110 typedef structcxx . . $ $anonymous_type_5129a7513b63d2fa_0# {
111 enumcxx . . $ $anonymous_type_5129a7513b63d2fa_0#$anonymous_type_1# {
112 OVAL_MODE_COMPUTEcxx . . $ $anonymous_type_5129a7513b63d2fa_0#OVAL_MODE_COMPUTE.,
113 OVAL_MODE_QUERYcxx . . $ $anonymous_type_5129a7513b63d2fa_0#OVAL_MODE_QUERY.
114 } modecxx . . $ $anonymous_type_5129a7513b63d2fa_0#mode.;
115 unioncxx . . $ $anonymous_type_5129a7513b63d2fa_0#$anonymous_type_2# {
116 struct oval_syschar_modelcxx . . $ oval_syschar_model# *sysmodcxx . . $ $anonymous_type_5129a7513b63d2fa_0#$anonymous_type_2#sysmod.;
117 #if defined(OVAL_PROBES_ENABLEDcxx . . $ `build/config.h:67:9`!)
118 oval_probe_session_tcxx . . $ oval_probe_session_t# *sesscxx . . $ $anonymous_type_5129a7513b63d2fa_0#$anonymous_type_2#sess.;
119 #endif
120 } ucxx . . $ $anonymous_type_5129a7513b63d2fa_0#u.;
121 } oval_argu_tcxx . . $ oval_argu_t#;
122
123 typedef struct oval_componentcxx . . $ oval_component# {
124 struct oval_definition_modelcxx . . $ oval_definition_model# *modelcxx . . $ oval_component#model.;
125 oval_component_type_tcxx . . $ oval_component_type_t# typecxx . . $ oval_component#type.;
126 } oval_component_tcxx . . $ oval_component_t#;
127
128 typedef struct oval_component_LITERALcxx . . $ oval_component_LITERAL# {
129 struct oval_definition_modelcxx . . $ oval_definition_model# *modelcxx . . $ oval_component_LITERAL#model.;
130 oval_component_type_tcxx . . $ oval_component_type_t# typecxx . . $ oval_component_LITERAL#type.;
131 struct oval_valuecxx . . $ oval_value# *valuecxx . . $ oval_component_LITERAL#value.; /*type==OVAL_COMPONENT_LITERAL */
132 } oval_component_LITERAL_tcxx . . $ oval_component_LITERAL_t#;
133
134 typedef struct oval_component_OBJECTREFcxx . . $ oval_component_OBJECTREF# {
135 struct oval_definition_modelcxx . . $ oval_definition_model# *modelcxx . . $ oval_component_OBJECTREF#model.;
136 oval_component_type_tcxx . . $ oval_component_type_t# typecxx . . $ oval_component_OBJECTREF#type.;
137 struct oval_objectcxx . . $ oval_object# *objectcxx . . $ oval_component_OBJECTREF#object.; /*type==OVAL_COMPONENT_OBJECTREF */
138 char *item_fieldcxx . . $ oval_component_OBJECTREF#item_field.;
139 char *record_fieldcxx . . $ oval_component_OBJECTREF#record_field.;
140 } oval_component_OBJECTREF_tcxx . . $ oval_component_OBJECTREF_t#;
141
142 typedef struct oval_component_VARREFcxx . . $ oval_component_VARREF# {
143 struct oval_definition_modelcxx . . $ oval_definition_model# *modelcxx . . $ oval_component_VARREF#model.;
144 oval_component_type_tcxx . . $ oval_component_type_t# typecxx . . $ oval_component_VARREF#type.;
145 struct oval_variablecxx . . $ oval_variable# *variablecxx . . $ oval_component_VARREF#variable.; /*type==OVAL_COMPONENT_VARREF */
146 } oval_component_VARREF_tcxx . . $ oval_component_VARREF_t#;
147
148 typedef struct oval_component_FUNCTIONcxx . . $ oval_component_FUNCTION# {
149 struct oval_definition_modelcxx . . $ oval_definition_model# *modelcxx . . $ oval_component_FUNCTION#model.;
150 oval_component_type_tcxx . . $ oval_component_type_t# typecxx . . $ oval_component_FUNCTION#type.;
151 struct oval_collectioncxx . . $ oval_collection# *function_componentscxx . . $ oval_component_FUNCTION#function_components.; /*type==OVAL_COMPONENT_FUNCTION */
152 } oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t#;
153
154 typedef struct oval_component_ARITHMETICcxx . . $ oval_component_ARITHMETIC# {
155 struct oval_definition_modelcxx . . $ oval_definition_model# *modelcxx . . $ oval_component_ARITHMETIC#model.;
156 oval_component_type_tcxx . . $ oval_component_type_t# typecxx . . $ oval_component_ARITHMETIC#type.;
157 struct oval_collectioncxx . . $ oval_collection# *function_componentscxx . . $ oval_component_ARITHMETIC#function_components.; /*type==OVAL_COMPONENT_FUNCTION */
158 oval_arithmetic_operation_tcxx . . $ oval_arithmetic_operation_t# operationcxx . . $ oval_component_ARITHMETIC#operation.; /*type==OVAL_COMPONENT_ARITHMETIC */
159 } oval_component_ARITHMETIC_tcxx . . $ oval_component_ARITHMETIC_t#;
160
161 typedef struct oval_component_BEGENDcxx . . $ oval_component_BEGEND# {
162 struct oval_definition_modelcxx . . $ oval_definition_model# *modelcxx . . $ oval_component_BEGEND#model.;
163 oval_component_type_tcxx . . $ oval_component_type_t# typecxx . . $ oval_component_BEGEND#type.;
164 struct oval_collectioncxx . . $ oval_collection# *function_componentscxx . . $ oval_component_BEGEND#function_components.; //type==OVAL_COMPONENT_FUNCTION
165 char *charactercxx . . $ oval_component_BEGEND#character.; //type==OVAL_COMPONENT_BEGIN/END
166 } oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t#;
167
168 typedef struct oval_component_SPLITcxx . . $ oval_component_SPLIT# {
169 struct oval_definition_modelcxx . . $ oval_definition_model# *modelcxx . . $ oval_component_SPLIT#model.;
170 oval_component_type_tcxx . . $ oval_component_type_t# typecxx . . $ oval_component_SPLIT#type.;
171 struct oval_collectioncxx . . $ oval_collection# *function_componentscxx . . $ oval_component_SPLIT#function_components.; /*type==OVAL_COMPONENT_FUNCTION */
172 char *delimitercxx . . $ oval_component_SPLIT#delimiter.; /*type==OVAL_COMPONENT_SPLIT */
173 } oval_component_SPLIT_tcxx . . $ oval_component_SPLIT_t#;
174
175 typedef struct oval_component_GLOBcxx . . $ oval_component_GLOB# {
176 struct oval_definition_modelcxx . . $ oval_definition_model# *modelcxx . . $ oval_component_GLOB#model.;
177 oval_component_type_tcxx . . $ oval_component_type_t# typecxx . . $ oval_component_GLOB#type.;
178 struct oval_collectioncxx . . $ oval_collection# *function_componentscxx . . $ oval_component_GLOB#function_components.; /*type==OVAL_COMPONENT_FUNCTION */
179 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! glob_noescapecxx . . $ oval_component_GLOB#glob_noescape.; /*type==OVAL_COMPONENT_GLOB */
180 } oval_component_GLOB_tcxx . . $ oval_component_GLOB_t#;
181
182 typedef struct oval_component_SUBSTRINGcxx . . $ oval_component_SUBSTRING# {
183 struct oval_definition_modelcxx . . $ oval_definition_model# *modelcxx . . $ oval_component_SUBSTRING#model.;
184 oval_component_type_tcxx . . $ oval_component_type_t# typecxx . . $ oval_component_SUBSTRING#type.;
185 struct oval_collectioncxx . . $ oval_collection# *function_componentscxx . . $ oval_component_SUBSTRING#function_components.; /*type==OVAL_COMPONENT_FUNCTION */
186 int startcxx . . $ oval_component_SUBSTRING#start.; /*type==OVAL_COMPONENT_SUBSTRING */
187 int lengthcxx . . $ oval_component_SUBSTRING#length.; /*type==OVAL_COMPONENT_SUBSTRING */
188 } oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t#;
189
190 typedef struct oval_component_TIMEDIFcxx . . $ oval_component_TIMEDIF# {
191 struct oval_definition_modelcxx . . $ oval_definition_model# *modelcxx . . $ oval_component_TIMEDIF#model.;
192 oval_component_type_tcxx . . $ oval_component_type_t# typecxx . . $ oval_component_TIMEDIF#type.;
193 struct oval_collectioncxx . . $ oval_collection# *function_componentscxx . . $ oval_component_TIMEDIF#function_components.; /*type==OVAL_COMPONENT_FUNCTION */
194 oval_datetime_format_tcxx . . $ oval_datetime_format_t# format_1cxx . . $ oval_component_TIMEDIF#format_1.; /*/type==OVAL_COMPONENT_TIMEDIF */
195 oval_datetime_format_tcxx . . $ oval_datetime_format_t# format_2cxx . . $ oval_component_TIMEDIF#format_2.; /*type==OVAL_COMPONENT_TIMEDIF */
196 } oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t#;
197
198 typedef struct oval_component_REGEX_CAPTUREcxx . . $ oval_component_REGEX_CAPTURE# {
199 struct oval_definition_modelcxx . . $ oval_definition_model# *modelcxx . . $ oval_component_REGEX_CAPTURE#model.;
200 oval_component_type_tcxx . . $ oval_component_type_t# typecxx . . $ oval_component_REGEX_CAPTURE#type.;
201 struct oval_collectioncxx . . $ oval_collection# *function_componentscxx . . $ oval_component_REGEX_CAPTURE#function_components.; /*type==OVAL_COMPONENT_FUNCTION */
202 char *patterncxx . . $ oval_component_REGEX_CAPTURE#pattern.; /*type==OVAL_COMPONENT_REGEX_CAPTURE */
203 } oval_component_REGEX_CAPTURE_tcxx . . $ oval_component_REGEX_CAPTURE_t#;
204
205 void oval_component_to_printcxx . . $ oval_component_to_print(aefd7fc05233fc8c).(struct oval_componentcxx . . $ oval_component# *component, char *indent, int index);
206 //typedef void (*oval_component_consumer)(struct oval_component_node *, void*);
207
208 /*
209 OVAL_COMPONENT_UNKNOWN = 0,
210 OVAL_FUNCTION_BEGIN = OVAL_FUNCTION + 1,
211 OVAL_FUNCTION_CONCAT = OVAL_FUNCTION + 2,
212 OVAL_FUNCTION_END = OVAL_FUNCTION + 3,
213 OVAL_FUNCTION_SPLIT = OVAL_FUNCTION + 4,
214 OVAL_FUNCTION_SUBSTRING = OVAL_FUNCTION + 5,
215 OVAL_FUNCTION_TIMEDIF = OVAL_FUNCTION + 6,
216 OVAL_FUNCTION_ESCAPE_REGEX = OVAL_FUNCTION + 7,
217 OVAL_FUNCTION_REGEX_CAPTURE = OVAL_FUNCTION + 8,
218 OVAL_FUNCTION_ARITHMETIC = OVAL_FUNCTION + 9
219 OVAL_FUNCTION_COUNT = OVAL_FUNCTION + 10,
220 OVAL_FUNCTION_GLOB_TO_REGEX = OVAL_FUNCTION + 12,
221
222 */
223 static const struct oscap_string_mapcxx . . $ oscap_string_map# _OVAL_COMPONENT_MAPcxx . . $ _OVAL_COMPONENT_MAP.[] = {
224 {OVAL_COMPONENT_LITERALcxx . . $ OVAL_COMPONENT_LITERAL., "literal_component"},
225 {OVAL_COMPONENT_OBJECTREFcxx . . $ OVAL_COMPONENT_OBJECTREF., "object_component"},
226 {OVAL_COMPONENT_VARREFcxx . . $ OVAL_COMPONENT_VARREF., "variable_component"},
227 {0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!}
228 };
229
230 static const struct oscap_string_mapcxx . . $ oscap_string_map# _OVAL_FUNCTION_MAPcxx . . $ _OVAL_FUNCTION_MAP.[] = {
231 {OVAL_FUNCTION_BEGINcxx . . $ OVAL_FUNCTION_BEGIN., "begin"},
232 {OVAL_FUNCTION_CONCATcxx . . $ OVAL_FUNCTION_CONCAT., "concat"},
233 {OVAL_FUNCTION_ENDcxx . . $ OVAL_FUNCTION_END., "end"},
234 {OVAL_FUNCTION_SPLITcxx . . $ OVAL_FUNCTION_SPLIT., "split"},
235 {OVAL_FUNCTION_SUBSTRINGcxx . . $ OVAL_FUNCTION_SUBSTRING., "substring"},
236 {OVAL_FUNCTION_TIMEDIFcxx . . $ OVAL_FUNCTION_TIMEDIF., "time_difference"},
237 {OVAL_FUNCTION_ESCAPE_REGEXcxx . . $ OVAL_FUNCTION_ESCAPE_REGEX., "escape_regex"},
238 {OVAL_FUNCTION_REGEX_CAPTUREcxx . . $ OVAL_FUNCTION_REGEX_CAPTURE., "regex_capture"},
239 {OVAL_FUNCTION_ARITHMETICcxx . . $ OVAL_FUNCTION_ARITHMETIC., "arithmetic"},
240 {OVAL_FUNCTION_COUNTcxx . . $ OVAL_FUNCTION_COUNT., "count"},
241 {OVAL_FUNCTION_UNIQUEcxx . . $ OVAL_FUNCTION_UNIQUE., "unique"},
242 {OVAL_FUNCTION_GLOB_TO_REGEXcxx . . $ OVAL_FUNCTION_GLOB_TO_REGEX., "glob_to_regex"},
243 {0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!}
244 };
245
246 /* End of variable definitions
247 * */
248 /***************************************************************************/
249
250 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(struct oval_component_iteratorcxx . . $ oval_component_iterator# *oc_component)
251 {
252 return oval_collection_iterator_has_morecxx . . $ oval_collection_iterator_has_more(de0650ab9b639739).((struct oval_iteratorcxx . . $ oval_iterator# *)oc_component);
253 }
254
255 int oval_component_iterator_remainingcxx . . $ oval_component_iterator_remaining(360b25b6bb1e1ca7).(struct oval_component_iteratorcxx . . $ oval_component_iterator# *oc_component)
256 {
257 return oval_collection_iterator_remainingcxx . . $ oval_collection_iterator_remaining(4404665b78efb7c8).((struct oval_iteratorcxx . . $ oval_iterator# *)oc_component);
258 }
259
260 struct oval_componentcxx . . $ oval_component# *oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(struct oval_component_iteratorcxx . . $ oval_component_iterator# *oc_component)
261 {
262 return (struct oval_componentcxx . . $ oval_component# *)
263 oval_collection_iterator_nextcxx . . $ oval_collection_iterator_next(344074693c9690a9).((struct oval_iteratorcxx . . $ oval_iterator# *)oc_component);
264 }
265
266 void oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(struct oval_component_iteratorcxx . . $ oval_component_iterator# *oc_component)
267 {
268 oval_collection_iterator_freecxx . . $ oval_collection_iterator_free(ee496816570b41f7).((struct oval_iteratorcxx . . $ oval_iterator# *)oc_component);
269 }
270
271 oval_component_type_tcxx . . $ oval_component_type_t# oval_component_get_typecxx . . $ oval_component_get_type(18aaf682e9b84bf).(struct oval_componentcxx . . $ oval_component# *component)
272 {
273 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
274
275 return component->typecxx . . $ oval_component#type.;
276 }
277
278 struct oval_valuecxx . . $ oval_value# *oval_component_get_literal_valuecxx . . $ oval_component_get_literal_value(1a03149cd032edc5).(struct oval_componentcxx . . $ oval_component# *component) {
279 /* type == OVAL_COMPONENT_LITERAL */
280 struct oval_valuecxx . . $ oval_value# *value = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
281 if (oval_component_get_typecxx . . $ oval_component_get_type(18aaf682e9b84bf).(component) == OVAL_COMPONENT_LITERALcxx . . $ OVAL_COMPONENT_LITERAL.) {
282 value = ((struct oval_component_LITERALcxx . . $ oval_component_LITERAL# *)component)->valuecxx . . $ oval_component_LITERAL#value.;
283 }
284 return value;
285 }
286
287 void oval_component_set_literal_valuecxx . . $ oval_component_set_literal_value(de4048bd19a8c6d1).(struct oval_componentcxx . . $ oval_component# *component, struct oval_valuecxx . . $ oval_value# *value) {
288 /* type == OVAL_COMPONENT_LITERAL */
289 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
290 if (oval_component_get_typecxx . . $ oval_component_get_type(18aaf682e9b84bf).(component) == OVAL_COMPONENT_LITERALcxx . . $ OVAL_COMPONENT_LITERAL.) {
291 ((struct oval_component_LITERALcxx . . $ oval_component_LITERAL# *)component)->valuecxx . . $ oval_component_LITERAL#value. = value;
292 }
293 }
294
295 void oval_component_set_typecxx . . $ oval_component_set_type(707b1e4df4b72323).(struct oval_componentcxx . . $ oval_component# *component, oval_component_type_tcxx . . $ oval_component_type_t# type)
296 {
297 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
298 component->typecxx . . $ oval_component#type. = type;
299 }
300
301 struct oval_objectcxx . . $ oval_object# *oval_component_get_objectcxx . . $ oval_component_get_object(cf0080289f144598).(struct oval_componentcxx . . $ oval_component# *component)
302 {
303 struct oval_objectcxx . . $ oval_object# *object = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
304 if (oval_component_get_typecxx . . $ oval_component_get_type(18aaf682e9b84bf).(component) == OVAL_COMPONENT_OBJECTREFcxx . . $ OVAL_COMPONENT_OBJECTREF.) {
305 object = ((struct oval_component_OBJECTREFcxx . . $ oval_component_OBJECTREF# *)component)->objectcxx . . $ oval_component_OBJECTREF#object.;
306 }
307 return object;
308 }
309
310 void oval_component_set_objectcxx . . $ oval_component_set_object(de8352ab377f29af).(struct oval_componentcxx . . $ oval_component# *component, struct oval_objectcxx . . $ oval_object# *object) {
311 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
312 if (oval_component_get_typecxx . . $ oval_component_get_type(18aaf682e9b84bf).(component) == OVAL_COMPONENT_OBJECTREFcxx . . $ OVAL_COMPONENT_OBJECTREF.) {
313 ((struct oval_component_OBJECTREFcxx . . $ oval_component_OBJECTREF# *)component)->objectcxx . . $ oval_component_OBJECTREF#object. = object;
314 }
315 }
316
317 char *oval_component_get_item_fieldcxx . . $ oval_component_get_item_field(801bf966f21b1bfa).(struct oval_componentcxx . . $ oval_component# *component) {
318 char *field = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
319 if (oval_component_get_typecxx . . $ oval_component_get_type(18aaf682e9b84bf).(component) == OVAL_COMPONENT_OBJECTREFcxx . . $ OVAL_COMPONENT_OBJECTREF.) {
320 field = ((struct oval_component_OBJECTREFcxx . . $ oval_component_OBJECTREF# *)component)->item_fieldcxx . . $ oval_component_OBJECTREF#item_field.;
321 }
322 return field;
323 }
324
325 void oval_component_set_item_fieldcxx . . $ oval_component_set_item_field(42130bbca6c87305).(struct oval_componentcxx . . $ oval_component# *component, char *field) {
326 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
327 if (oval_component_get_typecxx . . $ oval_component_get_type(18aaf682e9b84bf).(component) == OVAL_COMPONENT_OBJECTREFcxx . . $ OVAL_COMPONENT_OBJECTREF.) {
328 ((struct oval_component_OBJECTREFcxx . . $ oval_component_OBJECTREF# *)component)->item_fieldcxx . . $ oval_component_OBJECTREF#item_field. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(field);
329 }
330 }
331
332 char *oval_component_get_record_fieldcxx . . $ oval_component_get_record_field(801bf966f21b1bfa).(struct oval_componentcxx . . $ oval_component# *component) {
333 if (oval_component_get_typecxx . . $ oval_component_get_type(18aaf682e9b84bf).(component) != OVAL_COMPONENT_OBJECTREFcxx . . $ OVAL_COMPONENT_OBJECTREF.)
334 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
335
336 return ((struct oval_component_OBJECTREFcxx . . $ oval_component_OBJECTREF# *) component)->record_fieldcxx . . $ oval_component_OBJECTREF#record_field.;
337 }
338
339 void oval_component_set_record_fieldcxx . . $ oval_component_set_record_field(42130bbca6c87305).(struct oval_componentcxx . . $ oval_component# *component, char *field) {
340 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
341
342 if (oval_component_get_typecxx . . $ oval_component_get_type(18aaf682e9b84bf).(component) != OVAL_COMPONENT_OBJECTREFcxx . . $ OVAL_COMPONENT_OBJECTREF.) {
343 dWcxx . . $ `src/common/debug_priv.h:62:9`!("Wrong component type: %d.", oval_component_get_type(component));
344 return;
345 }
346
347 ((struct oval_component_OBJECTREFcxx . . $ oval_component_OBJECTREF# *) component)->record_fieldcxx . . $ oval_component_OBJECTREF#record_field. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(field);
348 }
349
350 struct oval_variablecxx . . $ oval_variable# *oval_component_get_variablecxx . . $ oval_component_get_variable(8ebdb0279366b4eb).(struct oval_componentcxx . . $ oval_component# *component) {
351 /* type == OVAL_COMPONENT_VARREF */
352 struct oval_variablecxx . . $ oval_variable# *variable = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
353 if (oval_component_get_typecxx . . $ oval_component_get_type(18aaf682e9b84bf).(component) == OVAL_COMPONENT_VARREFcxx . . $ OVAL_COMPONENT_VARREF.) {
354 variable = ((struct oval_component_VARREFcxx . . $ oval_component_VARREF# *)component)->variablecxx . . $ oval_component_VARREF#variable.;
355 }
356 return variable;
357 }
358
359 struct oval_component_iteratorcxx . . $ oval_component_iterator# *oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(struct
360 oval_componentcxx . . $ oval_component#
361 *component)
362 {
363 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
364
365 /* type == OVAL_COMPONENT_FUNCTION */
366 struct oval_component_iteratorcxx . . $ oval_component_iterator# *iterator;
367 if (component->typecxx . . $ oval_component#type. > OVAL_COMPONENT_FUNCTIONcxx . . $ OVAL_COMPONENT_FUNCTION.) {
368 oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *function = (oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *) component;
369 iterator = (struct oval_component_iteratorcxx . . $ oval_component_iterator# *)
370 oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(function->function_componentscxx . . $ oval_component_FUNCTION#function_components.);
371 } else
372 iterator = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
373 return iterator;
374 }
375
376 oval_arithmetic_operation_tcxx . . $ oval_arithmetic_operation_t# oval_component_get_arithmetic_operationcxx . . $ oval_component_get_arithmetic_operation(ba8405f156bed481).(struct oval_componentcxx . . $ oval_component# * component)
377 {
378 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
379
380 /* type == OVAL_COMPONENT_ARITHMETIC */
381 oval_arithmetic_operation_tcxx . . $ oval_arithmetic_operation_t# operation;
382 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_ARITHMETICcxx . . $ OVAL_FUNCTION_ARITHMETIC.) {
383 oval_component_ARITHMETIC_tcxx . . $ oval_component_ARITHMETIC_t# *arithmetic = (oval_component_ARITHMETIC_tcxx . . $ oval_component_ARITHMETIC_t# *) component;
384 operation = arithmetic->operationcxx . . $ oval_component_ARITHMETIC#operation.;
385 } else
386 operation = OVAL_ARITHMETIC_UNKNOWNcxx . . $ OVAL_ARITHMETIC_UNKNOWN.;
387 return operation;
388 }
389
390 void oval_component_set_arithmetic_operationcxx . . $ oval_component_set_arithmetic_operation(c8299c52c0604ae).(struct oval_componentcxx . . $ oval_component# *component, oval_arithmetic_operation_tcxx . . $ oval_arithmetic_operation_t# operation)
391 {
392 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
393
394 /* type == OVAL_COMPONENT_ARITHMETIC */
395 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_ARITHMETICcxx . . $ OVAL_FUNCTION_ARITHMETIC.) {
396 oval_component_ARITHMETIC_tcxx . . $ oval_component_ARITHMETIC_t# *arithmetic = (oval_component_ARITHMETIC_tcxx . . $ oval_component_ARITHMETIC_t# *) component;
397 arithmetic->operationcxx . . $ oval_component_ARITHMETIC#operation. = operation;
398 }
399 }
400
401 char *oval_component_get_prefixcxx . . $ oval_component_get_prefix(801bf966f21b1bfa).(struct oval_componentcxx . . $ oval_component# *component)
402 {
403 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
404
405 /* type == OVAL_COMPONENT_BEGIN/END */
406 char *character;
407 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_BEGINcxx . . $ OVAL_FUNCTION_BEGIN.) {
408 oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *begin = (oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *) component;
409 character = begin->charactercxx . . $ oval_component_BEGEND#character.;
410 } else
411 character = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
412 return character;
413 }
414
415 void oval_component_set_prefixcxx . . $ oval_component_set_prefix(42130bbca6c87305).(struct oval_componentcxx . . $ oval_component# *component, char *character)
416 {
417 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
418
419 /* type == OVAL_COMPONENT_BEGIN */
420 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_BEGINcxx . . $ OVAL_FUNCTION_BEGIN.) {
421 oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *begin = (oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *) component;
422 begin->charactercxx . . $ oval_component_BEGEND#character. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(character);
423 }
424 }
425
426 char *oval_component_get_suffixcxx . . $ oval_component_get_suffix(801bf966f21b1bfa).(struct oval_componentcxx . . $ oval_component# *component)
427 {
428 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
429
430 /* type == OVAL_COMPONENT_END */
431 char *character;
432 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_ENDcxx . . $ OVAL_FUNCTION_END.) {
433 oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *funcend = (oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *) component;
434 character = funcend->charactercxx . . $ oval_component_BEGEND#character.;
435 } else
436 character = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
437 return character;
438 }
439
440 void oval_component_set_suffixcxx . . $ oval_component_set_suffix(42130bbca6c87305).(struct oval_componentcxx . . $ oval_component# *component, char *character) {
441 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
442
443 /* type == OVAL_COMPONENT_END */
444 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_ENDcxx . . $ OVAL_FUNCTION_END.) {
445 oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *funcend = (oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *) component;
446 funcend->charactercxx . . $ oval_component_BEGEND#character. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(character);
447 }
448 }
449
450 char *oval_component_get_split_delimitercxx . . $ oval_component_get_split_delimiter(801bf966f21b1bfa).(struct oval_componentcxx . . $ oval_component# *component)
451 {
452 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
453
454 /* type == OVAL_COMPONENT_SPLIT */
455 char *delimiter;
456 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_SPLITcxx . . $ OVAL_FUNCTION_SPLIT.) {
457 oval_component_SPLIT_tcxx . . $ oval_component_SPLIT_t# *split = (oval_component_SPLIT_tcxx . . $ oval_component_SPLIT_t# *) component;
458 delimiter = split->delimitercxx . . $ oval_component_SPLIT#delimiter.;
459 } else
460 delimiter = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
461 return delimiter;
462 }
463
464 void oval_component_set_split_delimitercxx . . $ oval_component_set_split_delimiter(42130bbca6c87305).(struct oval_componentcxx . . $ oval_component# *component, char *delimeter) {
465 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
466
467 /* type == OVAL_COMPONENT_SPLIT */
468 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_SPLITcxx . . $ OVAL_FUNCTION_SPLIT.) {
469 oval_component_SPLIT_tcxx . . $ oval_component_SPLIT_t# *split = (oval_component_SPLIT_tcxx . . $ oval_component_SPLIT_t# *) component;
470 split->delimitercxx . . $ oval_component_SPLIT#delimiter. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(delimeter);
471 }
472 }
473
474 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! oval_component_get_glob_to_regex_glob_noescapecxx . . $ oval_component_get_glob_to_regex_glob_noescape(a3cfe8b68df8b786).(struct oval_componentcxx . . $ oval_component# *component)
475 {
476 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
477
478 /* type == OVAL_COMPONENT_GLOB */
479 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! glob_noescape;
480 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_GLOB_TO_REGEXcxx . . $ OVAL_FUNCTION_GLOB_TO_REGEX.) {
481 oval_component_GLOB_tcxx . . $ oval_component_GLOB_t# *glob_to_regex = (oval_component_GLOB_tcxx . . $ oval_component_GLOB_t# *) component;
482 glob_noescape = glob_to_regex->glob_noescapecxx . . $ oval_component_GLOB#glob_noescape.;
483 } else
484 glob_noescape = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
485 return glob_noescape;
486 }
487
488 void oval_component_set_glob_to_regex_glob_noescapecxx . . $ oval_component_set_glob_to_regex_glob_noescape(9d0995cfaa11d731).(struct oval_componentcxx . . $ oval_component# *component, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! glob_noescape) {
489 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
490
491 /* type == OVAL_COMPONENT_GLOB */
492 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_GLOB_TO_REGEXcxx . . $ OVAL_FUNCTION_GLOB_TO_REGEX.) {
493 oval_component_GLOB_tcxx . . $ oval_component_GLOB_t# *glob_to_regex = (oval_component_GLOB_tcxx . . $ oval_component_GLOB_t# *) component;
494 glob_to_regex->glob_noescapecxx . . $ oval_component_GLOB#glob_noescape. = glob_noescape;
495 }
496 }
497
498 int oval_component_get_substring_startcxx . . $ oval_component_get_substring_start(5e31221d32e7dfb3).(struct oval_componentcxx . . $ oval_component# *component)
499 {
500 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
501
502 /* type == OVAL_COMPONENT_SUBSTRING */
503 int start;
504 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_SUBSTRINGcxx . . $ OVAL_FUNCTION_SUBSTRING.) {
505 oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t# *substring = (oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t# *) component;
506 start = substring->startcxx . . $ oval_component_SUBSTRING#start.;
507 } else
508 start = -1;
509 return start;
510 }
511
512 void oval_component_set_substring_startcxx . . $ oval_component_set_substring_start(b2e4709797021641).(struct oval_componentcxx . . $ oval_component# *component, int start)
513 {
514 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
515
516 /* type==OVAL_COMPONENT_SUBSTRING */
517 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_SUBSTRINGcxx . . $ OVAL_FUNCTION_SUBSTRING.) {
518 oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t# *substring = (oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t# *) component;
519 substring->startcxx . . $ oval_component_SUBSTRING#start. = start;
520 }
521 }
522
523 int oval_component_get_substring_lengthcxx . . $ oval_component_get_substring_length(5e31221d32e7dfb3).(struct oval_componentcxx . . $ oval_component# *component)
524 {
525 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
526
527 /* type == OVAL_COMPONENT_SUBSTRING */
528 int length;
529 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_SUBSTRINGcxx . . $ OVAL_FUNCTION_SUBSTRING.) {
530 oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t# *substring = (oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t# *) component;
531 length = substring->lengthcxx . . $ oval_component_SUBSTRING#length.;
532 } else
533 length = -1;
534 return length;
535 }
536
537 void oval_component_set_substring_lengthcxx . . $ oval_component_set_substring_length(b2e4709797021641).(struct oval_componentcxx . . $ oval_component# *component, int length)
538 {
539 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
540
541 /* type == OVAL_COMPONENT_SUBSTRING */
542 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_SUBSTRINGcxx . . $ OVAL_FUNCTION_SUBSTRING.) {
543 oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t# *substring = (oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t# *) component;
544 substring->lengthcxx . . $ oval_component_SUBSTRING#length. = length;
545 }
546 }
547
548 oval_datetime_format_tcxx . . $ oval_datetime_format_t# oval_component_get_timedif_format_1cxx . . $ oval_component_get_timedif_format_1(723469270ffc4aa3).(struct oval_componentcxx . . $ oval_component#
549 *component)
550 {
551 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
552
553 /* type == OVAL_COMPONENT_TIMEDIF */
554 oval_datetime_format_tcxx . . $ oval_datetime_format_t# format;
555 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_TIMEDIFcxx . . $ OVAL_FUNCTION_TIMEDIF.) {
556 oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t# *timedif = (oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t# *) component;
557 format = timedif->format_1cxx . . $ oval_component_TIMEDIF#format_1.;
558 } else
559 format = OVAL_DATETIME_UNKNOWNcxx . . $ OVAL_DATETIME_UNKNOWN.;
560 return format;
561 }
562
563 void oval_component_set_timedif_format_1cxx . . $ oval_component_set_timedif_format_1(c76f09f16ad6c45b).(struct oval_componentcxx . . $ oval_component# *component, oval_datetime_format_tcxx . . $ oval_datetime_format_t# format)
564 {
565 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
566 /* type == OVAL_COMPONENT_TIMEDIF */
567 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_TIMEDIFcxx . . $ OVAL_FUNCTION_TIMEDIF.) {
568 oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t# *timedif = (oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t# *) component;
569 timedif->format_1cxx . . $ oval_component_TIMEDIF#format_1. = format;
570 }
571 }
572
573 oval_datetime_format_tcxx . . $ oval_datetime_format_t# oval_component_get_timedif_format_2cxx . . $ oval_component_get_timedif_format_2(723469270ffc4aa3).(struct oval_componentcxx . . $ oval_component#
574 *component)
575 {
576 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
577
578 /* typ == OVAL_COMPONENT_TIMEDIF */
579 oval_datetime_format_tcxx . . $ oval_datetime_format_t# format;
580 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_TIMEDIFcxx . . $ OVAL_FUNCTION_TIMEDIF.) {
581 oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t# *timedif = (oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t# *) component;
582 format = timedif->format_2cxx . . $ oval_component_TIMEDIF#format_2.;
583 } else
584 format = OVAL_DATETIME_UNKNOWNcxx . . $ OVAL_DATETIME_UNKNOWN.;
585 return format;
586 }
587
588 void oval_component_set_timedif_format_2cxx . . $ oval_component_set_timedif_format_2(c76f09f16ad6c45b).(struct oval_componentcxx . . $ oval_component# *component, oval_datetime_format_tcxx . . $ oval_datetime_format_t# format)
589 {
590 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
591 /* type == OVAL_COMPONENT_TIMEDIF */
592 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_TIMEDIFcxx . . $ OVAL_FUNCTION_TIMEDIF.) {
593 oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t# *timedif = (oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t# *) component;
594 timedif->format_2cxx . . $ oval_component_TIMEDIF#format_2. = format;
595 }
596 }
597
598 char *oval_component_get_regex_patterncxx . . $ oval_component_get_regex_pattern(801bf966f21b1bfa).(struct oval_componentcxx . . $ oval_component# *component) {
599 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
600
601 /* type == OVAL_COMPONENT_REGEX_CAPTURE */
602 char *pattern = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
603 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_REGEX_CAPTUREcxx . . $ OVAL_FUNCTION_REGEX_CAPTURE.) {
604 oval_component_REGEX_CAPTURE_tcxx . . $ oval_component_REGEX_CAPTURE_t# *regex = (oval_component_REGEX_CAPTURE_tcxx . . $ oval_component_REGEX_CAPTURE_t# *) component;
605 pattern = regex->patterncxx . . $ oval_component_REGEX_CAPTURE#pattern.;
606 }
607 return pattern;
608 }
609
610 void oval_component_set_regex_patterncxx . . $ oval_component_set_regex_pattern(42130bbca6c87305).(struct oval_componentcxx . . $ oval_component# *component, char *pattern)
611 {
612 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
613
614 /* type == OVAL_COMPONENT_REGEX_CAPTURE */
615 if (component->typecxx . . $ oval_component#type. == OVAL_FUNCTION_REGEX_CAPTUREcxx . . $ OVAL_FUNCTION_REGEX_CAPTURE.) {
616 oval_component_REGEX_CAPTURE_tcxx . . $ oval_component_REGEX_CAPTURE_t# *regex = (oval_component_REGEX_CAPTURE_tcxx . . $ oval_component_REGEX_CAPTURE_t# *) component;
617 regex->patterncxx . . $ oval_component_REGEX_CAPTURE#pattern. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(pattern);
618 }
619 }
620
621 struct oval_componentcxx . . $ oval_component# *oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(struct oval_definition_modelcxx . . $ oval_definition_model# *model, oval_component_type_tcxx . . $ oval_component_type_t# type)
622 {
623 oval_component_tcxx . . $ oval_component_t# *component = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
624
625 switch (type) {
626 case OVAL_COMPONENT_LITERALcxx . . $ OVAL_COMPONENT_LITERAL.:{
627 oval_component_LITERAL_tcxx . . $ oval_component_LITERAL_t# *literal =
628 (oval_component_LITERAL_tcxx . . $ oval_component_LITERAL_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_component_LITERAL_tcxx . . $ oval_component_LITERAL_t#));
629 if (literal == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
630 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
631
632 component = (oval_component_tcxx . . $ oval_component_t# *) literal;
633 literal->valuecxx . . $ oval_component_LITERAL#value. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
634 }
635 break;
636 case OVAL_COMPONENT_OBJECTREFcxx . . $ OVAL_COMPONENT_OBJECTREF.:{
637 oval_component_OBJECTREF_tcxx . . $ oval_component_OBJECTREF_t# *objectref =
638 (oval_component_OBJECTREF_tcxx . . $ oval_component_OBJECTREF_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_component_OBJECTREF_tcxx . . $ oval_component_OBJECTREF_t#));
639 if (objectref == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
640 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
641
642 component = (oval_component_tcxx . . $ oval_component_t# *) objectref;
643 objectref->objectcxx . . $ oval_component_OBJECTREF#object. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
644 objectref->item_fieldcxx . . $ oval_component_OBJECTREF#item_field. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
645 objectref->record_fieldcxx . . $ oval_component_OBJECTREF#record_field. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
646 }
647 break;
648 case OVAL_COMPONENT_VARREFcxx . . $ OVAL_COMPONENT_VARREF.:{
649 oval_component_VARREF_tcxx . . $ oval_component_VARREF_t# *varref =
650 (oval_component_VARREF_tcxx . . $ oval_component_VARREF_t# *) malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_component_VARREF_tcxx . . $ oval_component_VARREF_t#));
651 if (varref == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
652 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
653
654 component = (oval_component_tcxx . . $ oval_component_t# *) varref;
655 varref->variablecxx . . $ oval_component_VARREF#variable. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
656 }
657 break;
658 default: /* OVAL_COMPONENT_FUNCTION */
659 {
660 oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *function;
661 switch (type) {
662 case OVAL_FUNCTION_ARITHMETICcxx . . $ OVAL_FUNCTION_ARITHMETIC.:{
663 oval_component_ARITHMETIC_tcxx . . $ oval_component_ARITHMETIC_t# *arithmetic = (oval_component_ARITHMETIC_tcxx . . $ oval_component_ARITHMETIC_t# *)
664 (function = (oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *)
665 malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_component_ARITHMETIC_tcxx . . $ oval_component_ARITHMETIC_t#)));
666 if (arithmetic == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
667 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
668
669 arithmetic->operationcxx . . $ oval_component_ARITHMETIC#operation. = OVAL_ARITHMETIC_UNKNOWNcxx . . $ OVAL_ARITHMETIC_UNKNOWN.;
670 };
671 break;
672 case OVAL_FUNCTION_BEGINcxx . . $ OVAL_FUNCTION_BEGIN.:
673 case OVAL_FUNCTION_ENDcxx . . $ OVAL_FUNCTION_END.:{
674 oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *begin = (oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *)
675 (function = (oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *)
676 malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t#)));
677 if (begin == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
678 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
679
680 begin->charactercxx . . $ oval_component_BEGEND#character. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
681 };
682 break;
683 case OVAL_FUNCTION_SPLITcxx . . $ OVAL_FUNCTION_SPLIT.:{
684 oval_component_SPLIT_tcxx . . $ oval_component_SPLIT_t# *split = (oval_component_SPLIT_tcxx . . $ oval_component_SPLIT_t# *)
685 (function = (oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *)
686 malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_component_SPLIT_tcxx . . $ oval_component_SPLIT_t#)));
687 if (split == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
688 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
689
690 split->delimitercxx . . $ oval_component_SPLIT#delimiter. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
691 };
692 break;
693 case OVAL_FUNCTION_GLOB_TO_REGEXcxx . . $ OVAL_FUNCTION_GLOB_TO_REGEX.:{
694 oval_component_GLOB_tcxx . . $ oval_component_GLOB_t# *glob_to_regex = (oval_component_GLOB_tcxx . . $ oval_component_GLOB_t# *)
695 (function = (oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *)
696 malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_component_GLOB_tcxx . . $ oval_component_GLOB_t#)));
697 if (glob_to_regex == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
698 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
699 glob_to_regex->glob_noescapecxx . . $ oval_component_GLOB#glob_noescape. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
700 };
701 break;
702 case OVAL_FUNCTION_SUBSTRINGcxx . . $ OVAL_FUNCTION_SUBSTRING.:{
703 oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t# *substring = (oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t# *)
704 (function = (oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *)
705 malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t#)));
706 if (substring == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
707 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
708
709 substring->lengthcxx . . $ oval_component_SUBSTRING#length. = -1;
710 substring->startcxx . . $ oval_component_SUBSTRING#start. = -1;
711 };
712 break;
713 case OVAL_FUNCTION_TIMEDIFcxx . . $ OVAL_FUNCTION_TIMEDIF.:{
714 oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t# *timedif = (oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t# *)
715 (function = (oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *)
716 malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t#)));
717 if (timedif == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
718 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
719
720 timedif->format_1cxx . . $ oval_component_TIMEDIF#format_1. = OVAL_DATETIME_UNKNOWNcxx . . $ OVAL_DATETIME_UNKNOWN.;
721 timedif->format_2cxx . . $ oval_component_TIMEDIF#format_2. = OVAL_DATETIME_UNKNOWNcxx . . $ OVAL_DATETIME_UNKNOWN.;
722 };
723 break;
724 case OVAL_FUNCTION_REGEX_CAPTUREcxx . . $ OVAL_FUNCTION_REGEX_CAPTURE.:{
725 oval_component_REGEX_CAPTURE_tcxx . . $ oval_component_REGEX_CAPTURE_t# *regex = (oval_component_REGEX_CAPTURE_tcxx . . $ oval_component_REGEX_CAPTURE_t# *)
726 (function = (oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *)
727 malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_component_REGEX_CAPTURE_tcxx . . $ oval_component_REGEX_CAPTURE_t#)));
728 if (regex == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
729 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
730
731 regex->patterncxx . . $ oval_component_REGEX_CAPTURE#pattern. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
732 };
733 break;
734 default:{
735 function = (oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *)
736 malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t#));
737 if (function == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
738 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
739 }
740 }
741
742 component = (oval_component_tcxx . . $ oval_component_t# *) function;
743 function->function_componentscxx . . $ oval_component_FUNCTION#function_components. = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
744 }
745 break;
746
747 }
748 component->typecxx . . $ oval_component#type. = type;
749 component->modelcxx . . $ oval_component#model. = model;
750 return component;
751 }
752
753 static void _oval_component_clone_subcomponentscxx . . $ _oval_component_clone_subcomponents(6c03e02e1177fccf).
754 (struct oval_componentcxx . . $ oval_component# *old_component, struct oval_componentcxx . . $ oval_component# *new_component, struct oval_definition_modelcxx . . $ oval_definition_model# *model) {
755 struct oval_component_iteratorcxx . . $ oval_component_iterator# *subcomps = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(old_component);
756 if (subcomps)
757 while (oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps)) {
758 struct oval_componentcxx . . $ oval_component# *subcomp = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(subcomps);
759 oval_component_add_function_componentcxx . . $ oval_component_add_function_component(e2fc72c73b1d4e22).(new_component, oval_component_clonecxx . . $ oval_component_clone(a0f4848fdc472584).(model, subcomp));
760 }
761 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
762 }
763
764 struct oval_componentcxx . . $ oval_component# *oval_component_clonecxx . . $ oval_component_clone(a0f4848fdc472584).(struct oval_definition_modelcxx . . $ oval_definition_model# *new_model,
765 struct oval_componentcxx . . $ oval_component# *old_component)
766 {
767 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(old_component);
768
769 struct oval_componentcxx . . $ oval_component# *new_component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(new_model, old_component->typecxx . . $ oval_component#type.);
770 if (new_component == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
771 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
772
773 switch (new_component->typecxx . . $ oval_component#type.) {
774 case OVAL_FUNCTION_ARITHMETICcxx . . $ OVAL_FUNCTION_ARITHMETIC.:{
775 oval_arithmetic_operation_tcxx . . $ oval_arithmetic_operation_t# operation = oval_component_get_arithmetic_operationcxx . . $ oval_component_get_arithmetic_operation(ba8405f156bed481).(old_component);
776 if (operation)
777 oval_component_set_arithmetic_operationcxx . . $ oval_component_set_arithmetic_operation(c8299c52c0604ae).(new_component, operation);
778 }
779 break;
780 case OVAL_FUNCTION_BEGINcxx . . $ OVAL_FUNCTION_BEGIN.:{
781 char *begchar = oval_component_get_prefixcxx . . $ oval_component_get_prefix(801bf966f21b1bfa).(old_component);
782 if (begchar)
783 oval_component_set_prefixcxx . . $ oval_component_set_prefix(42130bbca6c87305).(new_component, begchar);
784 }
785 break;
786 case OVAL_FUNCTION_ENDcxx . . $ OVAL_FUNCTION_END.:{
787 char *endchar = oval_component_get_suffixcxx . . $ oval_component_get_suffix(801bf966f21b1bfa).(old_component);
788 if (endchar)
789 oval_component_set_suffixcxx . . $ oval_component_set_suffix(42130bbca6c87305).(new_component, endchar);
790 }
791 break;
792 case OVAL_COMPONENT_LITERALcxx . . $ OVAL_COMPONENT_LITERAL.:{
793 struct oval_valuecxx . . $ oval_value# *value = oval_component_get_literal_valuecxx . . $ oval_component_get_literal_value(1a03149cd032edc5).(old_component);
794 if (value)
795 oval_component_set_literal_valuecxx . . $ oval_component_set_literal_value(de4048bd19a8c6d1).(new_component, oval_value_clonecxx . . $ oval_value_clone(5de282da9e151d11).(value));
796 }
797 break;
798 case OVAL_COMPONENT_OBJECTREFcxx . . $ OVAL_COMPONENT_OBJECTREF.:{
799 char *field;
800 struct oval_objectcxx . . $ oval_object# *old_object = oval_component_get_objectcxx . . $ oval_component_get_object(cf0080289f144598).(old_component);
801 if (old_object) {
802 struct oval_objectcxx . . $ oval_object# *new_object = oval_object_clonecxx . . $ oval_object_clone(cda8d9effee3e98b).(new_model, old_object);
803 oval_component_set_objectcxx . . $ oval_component_set_object(de8352ab377f29af).(new_component, new_object);
804 }
805 field = oval_component_get_item_fieldcxx . . $ oval_component_get_item_field(801bf966f21b1bfa).(old_component);
806 if (field)
807 oval_component_set_item_fieldcxx . . $ oval_component_set_item_field(42130bbca6c87305).(new_component, field);
808 field = oval_component_get_record_fieldcxx . . $ oval_component_get_record_field(801bf966f21b1bfa).(old_component);
809 if (field)
810 oval_component_set_record_fieldcxx . . $ oval_component_set_record_field(42130bbca6c87305).(new_component, field);
811 }
812 break;
813 case OVAL_FUNCTION_REGEX_CAPTUREcxx . . $ OVAL_FUNCTION_REGEX_CAPTURE.:{
814 char *pattern = oval_component_get_regex_patterncxx . . $ oval_component_get_regex_pattern(801bf966f21b1bfa).(old_component);
815 if (pattern)
816 oval_component_set_regex_patterncxx . . $ oval_component_set_regex_pattern(42130bbca6c87305).(new_component, pattern);
817 }
818 break;
819 case OVAL_FUNCTION_SPLITcxx . . $ OVAL_FUNCTION_SPLIT.:{
820 char *delimiter = oval_component_get_split_delimitercxx . . $ oval_component_get_split_delimiter(801bf966f21b1bfa).(old_component);
821 if (delimiter)
822 oval_component_set_split_delimitercxx . . $ oval_component_set_split_delimiter(42130bbca6c87305).(new_component, delimiter);
823 }
824 break;
825 case OVAL_FUNCTION_GLOB_TO_REGEXcxx . . $ OVAL_FUNCTION_GLOB_TO_REGEX.:{
826 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! glob_noescape = oval_component_get_glob_to_regex_glob_noescapecxx . . $ oval_component_get_glob_to_regex_glob_noescape(a3cfe8b68df8b786).(old_component);
827 oval_component_set_glob_to_regex_glob_noescapecxx . . $ oval_component_set_glob_to_regex_glob_noescape(9d0995cfaa11d731).(new_component, glob_noescape);
828 }
829 break;
830 case OVAL_FUNCTION_SUBSTRINGcxx . . $ OVAL_FUNCTION_SUBSTRING.:{
831 int length = oval_component_get_substring_lengthcxx . . $ oval_component_get_substring_length(5e31221d32e7dfb3).(old_component);
832 oval_component_set_substring_lengthcxx . . $ oval_component_set_substring_length(b2e4709797021641).(new_component, length);
833 int start = oval_component_get_substring_startcxx . . $ oval_component_get_substring_start(5e31221d32e7dfb3).(old_component);
834 oval_component_set_substring_startcxx . . $ oval_component_set_substring_start(b2e4709797021641).(new_component, start);
835 } break;
836 case OVAL_FUNCTION_TIMEDIFcxx . . $ OVAL_FUNCTION_TIMEDIF.:{
837 oval_datetime_format_tcxx . . $ oval_datetime_format_t# format1 = oval_component_get_timedif_format_1cxx . . $ oval_component_get_timedif_format_1(723469270ffc4aa3).(old_component);
838 if (format1)
839 oval_component_set_timedif_format_1cxx . . $ oval_component_set_timedif_format_1(c76f09f16ad6c45b).(new_component, format1);
840 oval_datetime_format_tcxx . . $ oval_datetime_format_t# format2 = oval_component_get_timedif_format_2cxx . . $ oval_component_get_timedif_format_2(723469270ffc4aa3).(old_component);
841 if (format2)
842 oval_component_set_timedif_format_1cxx . . $ oval_component_set_timedif_format_1(c76f09f16ad6c45b).(new_component, format2);
843 }
844 break;
845 case OVAL_COMPONENT_VARREFcxx . . $ OVAL_COMPONENT_VARREF.:{
846 struct oval_variablecxx . . $ oval_variable# *old_variable = oval_component_get_variablecxx . . $ oval_component_get_variable(8ebdb0279366b4eb).(old_component);
847 if (old_variable) {
848 struct oval_variablecxx . . $ oval_variable# *new_variable = oval_variable_clonecxx . . $ oval_variable_clone(f12623c0add04796).(new_model, old_variable);
849 oval_component_set_variablecxx . . $ oval_component_set_variable(b5f77146f8ee61b).(new_component, new_variable);
850 }
851 } break;
852 default:
853 /*NOOP*/ break;
854 }
855
856 if (new_component->typecxx . . $ oval_component#type. > OVAL_FUNCTIONcxx . . $ `src/OVAL/public/oval_definitions.h:199:9`!)
857 _oval_component_clone_subcomponentscxx . . $ _oval_component_clone_subcomponents(6c03e02e1177fccf).(old_component, new_component, new_model);
858
859 return new_component;
860 }
861
862 void oval_component_freecxx . . $ oval_component_free(97b0907e4280ed94).(struct oval_componentcxx . . $ oval_component# *component)
863 {
864 if (component == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
865 return;
866
867 switch (component->typecxx . . $ oval_component#type.) {
868 case OVAL_COMPONENT_LITERALcxx . . $ OVAL_COMPONENT_LITERAL.:{
869 oval_component_LITERAL_tcxx . . $ oval_component_LITERAL_t# *literal = (oval_component_LITERAL_tcxx . . $ oval_component_LITERAL_t# *) component;
870 oval_value_freecxx . . $ oval_value_free(d25d962808f14280).(literal->valuecxx . . $ oval_component_LITERAL#value.);
871 literal->valuecxx . . $ oval_component_LITERAL#value. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
872 }
873 break;
874 case OVAL_COMPONENT_OBJECTREFcxx . . $ OVAL_COMPONENT_OBJECTREF.:{
875 oval_component_OBJECTREF_tcxx . . $ oval_component_OBJECTREF_t# *objectref = (oval_component_OBJECTREF_tcxx . . $ oval_component_OBJECTREF_t# *) component;
876 freecxx . . $ free(5d22bdacc48458e8).(objectref->item_fieldcxx . . $ oval_component_OBJECTREF#item_field.);
877 objectref->item_fieldcxx . . $ oval_component_OBJECTREF#item_field. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
878 freecxx . . $ free(5d22bdacc48458e8).(objectref->record_fieldcxx . . $ oval_component_OBJECTREF#record_field.);
879 objectref->record_fieldcxx . . $ oval_component_OBJECTREF#record_field. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
880 }
881 break;
882 case OVAL_FUNCTION_BEGINcxx . . $ OVAL_FUNCTION_BEGIN.:
883 case OVAL_FUNCTION_ENDcxx . . $ OVAL_FUNCTION_END.:{
884 oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *begin = (oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *) component;
885 freecxx . . $ free(5d22bdacc48458e8).(begin->charactercxx . . $ oval_component_BEGEND#character.);
886 begin->charactercxx . . $ oval_component_BEGEND#character. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
887 };
888 break;
889 case OVAL_FUNCTION_SPLITcxx . . $ OVAL_FUNCTION_SPLIT.:{
890 oval_component_SPLIT_tcxx . . $ oval_component_SPLIT_t# *split = (oval_component_SPLIT_tcxx . . $ oval_component_SPLIT_t# *) component;
891 freecxx . . $ free(5d22bdacc48458e8).(split->delimitercxx . . $ oval_component_SPLIT#delimiter.);
892 split->delimitercxx . . $ oval_component_SPLIT#delimiter. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
893 };
894 break;
895 case OVAL_FUNCTION_REGEX_CAPTUREcxx . . $ OVAL_FUNCTION_REGEX_CAPTURE.:{
896 oval_component_REGEX_CAPTURE_tcxx . . $ oval_component_REGEX_CAPTURE_t# *regex = (oval_component_REGEX_CAPTURE_tcxx . . $ oval_component_REGEX_CAPTURE_t# *) component;
897 freecxx . . $ free(5d22bdacc48458e8).(regex->patterncxx . . $ oval_component_REGEX_CAPTURE#pattern.);
898 regex->patterncxx . . $ oval_component_REGEX_CAPTURE#pattern. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
899 };
900 break;
901 case OVAL_FUNCTION_GLOB_TO_REGEXcxx . . $ OVAL_FUNCTION_GLOB_TO_REGEX.:
902 case OVAL_FUNCTION_CONCATcxx . . $ OVAL_FUNCTION_CONCAT.:
903 case OVAL_FUNCTION_COUNTcxx . . $ OVAL_FUNCTION_COUNT.:
904 case OVAL_FUNCTION_UNIQUEcxx . . $ OVAL_FUNCTION_UNIQUE.:
905 case OVAL_FUNCTION_SUBSTRINGcxx . . $ OVAL_FUNCTION_SUBSTRING.:
906 case OVAL_FUNCTION_TIMEDIFcxx . . $ OVAL_FUNCTION_TIMEDIF.:
907 case OVAL_FUNCTION_ESCAPE_REGEXcxx . . $ OVAL_FUNCTION_ESCAPE_REGEX.:
908 case OVAL_FUNCTION_ARITHMETICcxx . . $ OVAL_FUNCTION_ARITHMETIC.:
909 case OVAL_FUNCTION_LASTcxx . . $ OVAL_FUNCTION_LAST.:
910 case OVAL_COMPONENT_VARREFcxx . . $ OVAL_COMPONENT_VARREF.:
911 case OVAL_COMPONENT_FUNCTIONcxx . . $ OVAL_COMPONENT_FUNCTION.:
912 case OVAL_COMPONENT_UNKNOWNcxx . . $ OVAL_COMPONENT_UNKNOWN.:
913 /*NOOP*/ break;
914 }
915 if (component->typecxx . . $ oval_component#type. > OVAL_FUNCTIONcxx . . $ `src/OVAL/public/oval_definitions.h:199:9`!) {
916 oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *function = (oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *) component;
917 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(function->function_componentscxx . . $ oval_component_FUNCTION#function_components., (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_component_freecxx . . $ oval_component_free(97b0907e4280ed94).);
918 function->function_componentscxx . . $ oval_component_FUNCTION#function_components. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
919 }
920 freecxx . . $ free(5d22bdacc48458e8).(component);
921 }
922
923 void oval_component_add_function_componentcxx . . $ oval_component_add_function_component(e2fc72c73b1d4e22).(struct oval_componentcxx . . $ oval_component# *component, struct oval_componentcxx . . $ oval_component# *func_component)
924 {
925 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
926
927 if (component->typecxx . . $ oval_component#type. > OVAL_FUNCTIONcxx . . $ `src/OVAL/public/oval_definitions.h:199:9`!) {
928 oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *function = (oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *) component;
929 if (func_component)
930 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(function->function_componentscxx . . $ oval_component_FUNCTION#function_components., func_component);
931 }
932 }
933
934 void oval_component_set_variablecxx . . $ oval_component_set_variable(b5f77146f8ee61b).(struct oval_componentcxx . . $ oval_component# *component, struct oval_variablecxx . . $ oval_variable# *variable)
935 {
936 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
937
938 /* type == OVAL_COMPONENT_VARREF */
939 if (component->typecxx . . $ oval_component#type. == OVAL_COMPONENT_VARREFcxx . . $ OVAL_COMPONENT_VARREF.) {
940 oval_component_VARREF_tcxx . . $ oval_component_VARREF_t# *varref = (oval_component_VARREF_tcxx . . $ oval_component_VARREF_t# *) component;
941 varref->variablecxx . . $ oval_component_VARREF#variable. = variable;
942 }
943 }
944
945 static void oval_value_consumecxx . . $ oval_value_consume(4ed62f63db8a189a).(struct oval_valuecxx . . $ oval_value# *value, void *component)
946 {
947 oval_component_set_literal_valuecxx . . $ oval_component_set_literal_value(de4048bd19a8c6d1).(component, value);
948 }
949
950 static int _oval_component_parse_LITERAL_tagcxx . . $ _oval_component_parse_LITERAL_tag(9a1cb246f3d48936).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader,
951 struct oval_parser_contextcxx . . $ oval_parser_context# *context, struct oval_componentcxx . . $ oval_component# *component)
952 {
953
954 return oval_value_parse_tagcxx . . $ oval_value_parse_tag(24b85e39d8efe8a).(reader, context, oval_value_consumecxx . . $ oval_value_consume(4ed62f63db8a189a)., component);
955 }
956
957 static int _oval_component_parse_OBJECTREF_tagcxx . . $ _oval_component_parse_OBJECTREF_tag(9a1cb246f3d48936).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader,
958 struct oval_parser_contextcxx . . $ oval_parser_context# *context, struct oval_componentcxx . . $ oval_component# *component)
959 {
960
961 struct oval_definition_modelcxx . . $ oval_definition_model# *model = context->definition_modelcxx . . $ oval_parser_context#definition_model.;
962 char *objref = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "object_ref");
963 struct oval_objectcxx . . $ oval_object# *object = oval_definition_model_get_new_objectcxx . . $ oval_definition_model_get_new_object(2c583c84850ee973).(model, objref);
964 char *field;
965
966 freecxx . . $ free(5d22bdacc48458e8).(objref);
967 objref = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
968 oval_component_set_objectcxx . . $ oval_component_set_object(de8352ab377f29af).(component, object);
969
970 field = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "item_field");
971 oval_component_set_item_fieldcxx . . $ oval_component_set_item_field(42130bbca6c87305).(component, field);
972 if (field)
973 freecxx . . $ free(5d22bdacc48458e8).(field);
974 field = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "record_field");
975 oval_component_set_record_fieldcxx . . $ oval_component_set_record_field(42130bbca6c87305).(component, field);
976 if (field)
977 freecxx . . $ free(5d22bdacc48458e8).(field);
978
979 return 0;
980 }
981
982 static int _oval_component_parse_VARREF_tagcxx . . $ _oval_component_parse_VARREF_tag(9a1cb246f3d48936).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader,
983 struct oval_parser_contextcxx . . $ oval_parser_context# *context, struct oval_componentcxx . . $ oval_component# *component)
984 {
985
986 struct oval_definition_modelcxx . . $ oval_definition_model# *model = context->definition_modelcxx . . $ oval_parser_context#definition_model.;
987 char *varref = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "var_ref");
988 struct oval_variablecxx . . $ oval_variable# *variable = oval_definition_model_get_new_variablecxx . . $ oval_definition_model_get_new_variable(d0b65e206dc01f0d).(model, varref, OVAL_VARIABLE_UNKNOWNcxx . . $ OVAL_VARIABLE_UNKNOWN.);
989 if (varref != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
990 freecxx . . $ free(5d22bdacc48458e8).(varref);
991 varref = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
992 }
993 oval_component_set_variablecxx . . $ oval_component_set_variable(b5f77146f8ee61b).(component, variable);
994
995 return 0;
996 }
997
998 static void oval_subcomp_consumecxx . . $ oval_subcomp_consume(313cb9b79853794d).(struct oval_componentcxx . . $ oval_component# *subcomp, void *func)
999 {
1000
1001 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(func);
1002
1003 oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *function = func;
1004 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(function->function_componentscxx . . $ oval_component_FUNCTION#function_components., (void *)subcomp);
1005 }
1006
1007 static int oval_subcomp_tag_consumecxx . . $ oval_subcomp_tag_consume(cf369959597901d1).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader, struct oval_parser_contextcxx . . $ oval_parser_context# *context, void *func)
1008 {
1009
1010 return oval_component_parse_tagcxx . . $ oval_component_parse_tag(43578c87bd82b671).(reader, context, &oval_subcomp_consumecxx . . $ oval_subcomp_consume(313cb9b79853794d)., func);
1011 }
1012
1013 static int _oval_component_parse_FUNCTION_tagcxx . . $ _oval_component_parse_FUNCTION_tag(9a1cb246f3d48936).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader,
1014 struct oval_parser_contextcxx . . $ oval_parser_context# *context, struct oval_componentcxx . . $ oval_component# *component)
1015 {
1016 oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *function = (oval_component_FUNCTION_tcxx . . $ oval_component_FUNCTION_t# *) component;
1017 return oval_parser_parse_tagcxx . . $ oval_parser_parse_tag(4eaaf867ce26f59b).(reader, context, &oval_subcomp_tag_consumecxx . . $ oval_subcomp_tag_consume(cf369959597901d1)., function);
1018 }
1019
1020 static int _oval_component_parse_ARITHMETIC_tagcxx . . $ _oval_component_parse_ARITHMETIC_tag(9a1cb246f3d48936).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader,
1021 struct oval_parser_contextcxx . . $ oval_parser_context# *context, struct oval_componentcxx . . $ oval_component# *component)
1022 {
1023 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
1024
1025 oval_component_ARITHMETIC_tcxx . . $ oval_component_ARITHMETIC_t# *arithmetic = (oval_component_ARITHMETIC_tcxx . . $ oval_component_ARITHMETIC_t# *) component;
1026 oval_arithmetic_operation_tcxx . . $ oval_arithmetic_operation_t# operation = oval_arithmetic_operation_parsecxx . . $ oval_arithmetic_operation_parse(30003977de12c7d1).(reader, "arithmetic_operation",
1027 OVAL_ARITHMETIC_UNKNOWNcxx . . $ OVAL_ARITHMETIC_UNKNOWN.);
1028 arithmetic->operationcxx . . $ oval_component_ARITHMETIC#operation. = operation;
1029 return _oval_component_parse_FUNCTION_tagcxx . . $ _oval_component_parse_FUNCTION_tag(9a1cb246f3d48936).(reader, context, component);
1030 }
1031
1032 static int _oval_component_parse_BEGEND_tagcxx . . $ _oval_component_parse_BEGEND_tag(9a1cb246f3d48936).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader,
1033 struct oval_parser_contextcxx . . $ oval_parser_context# *context, struct oval_componentcxx . . $ oval_component# *component)
1034 {
1035
1036 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
1037
1038 oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *begend = (oval_component_BEGEND_tcxx . . $ oval_component_BEGEND_t# *) component;
1039 begend->charactercxx . . $ oval_component_BEGEND#character. = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "character");
1040
1041 return _oval_component_parse_FUNCTION_tagcxx . . $ _oval_component_parse_FUNCTION_tag(9a1cb246f3d48936).(reader, context, component);
1042 }
1043
1044 static int _oval_component_parse_SPLIT_tagcxx . . $ _oval_component_parse_SPLIT_tag(9a1cb246f3d48936).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader,
1045 struct oval_parser_contextcxx . . $ oval_parser_context# *context, struct oval_componentcxx . . $ oval_component# *component)
1046 {
1047
1048 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
1049
1050 oval_component_SPLIT_tcxx . . $ oval_component_SPLIT_t# *split = (oval_component_SPLIT_tcxx . . $ oval_component_SPLIT_t# *) component;
1051 split->delimitercxx . . $ oval_component_SPLIT#delimiter. = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "delimiter");
1052
1053 return _oval_component_parse_FUNCTION_tagcxx . . $ _oval_component_parse_FUNCTION_tag(9a1cb246f3d48936).(reader, context, component);
1054 }
1055
1056 static int _oval_component_parse_GLOB_TO_REGEX_tagcxx . . $ _oval_component_parse_GLOB_TO_REGEX_tag(9a1cb246f3d48936).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader,
1057 struct oval_parser_contextcxx . . $ oval_parser_context# *context, struct oval_componentcxx . . $ oval_component# *component)
1058 {
1059
1060 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
1061
1062 oval_component_GLOB_tcxx . . $ oval_component_GLOB_t# *glob_to_regex = (oval_component_GLOB_tcxx . . $ oval_component_GLOB_t# *) component;
1063 glob_to_regex->glob_noescapecxx . . $ oval_component_GLOB#glob_noescape. = oval_parser_boolean_attributecxx . . $ oval_parser_boolean_attribute(a53adaee35698733).(reader, "glob_noescape", 0);
1064
1065 return _oval_component_parse_FUNCTION_tagcxx . . $ _oval_component_parse_FUNCTION_tag(9a1cb246f3d48936).(reader, context, component);
1066 }
1067
1068
1069 static int _oval_component_parse_SUBSTRING_tagcxx . . $ _oval_component_parse_SUBSTRING_tag(9a1cb246f3d48936).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader,
1070 struct oval_parser_contextcxx . . $ oval_parser_context# *context, struct oval_componentcxx . . $ oval_component# *component)
1071 {
1072
1073 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
1074
1075 oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t# *substring = (oval_component_SUBSTRING_tcxx . . $ oval_component_SUBSTRING_t# *) component;
1076 char *start_text = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "substring_start");
1077 char *length_text = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "substring_length");
1078 int start = (start_text == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) ? 0 : atoicxx . . $ atoi(5c4306d8553b3696).(start_text);
1079 int length = (length_text == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) ? 0 : atoicxx . . $ atoi(5c4306d8553b3696).(length_text);
1080 if (start_text != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1081 freecxx . . $ free(5d22bdacc48458e8).(start_text);
1082 if (length_text != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1083 freecxx . . $ free(5d22bdacc48458e8).(length_text);
1084 substring->startcxx . . $ oval_component_SUBSTRING#start. = start;
1085 substring->lengthcxx . . $ oval_component_SUBSTRING#length. = length;
1086
1087 return _oval_component_parse_FUNCTION_tagcxx . . $ _oval_component_parse_FUNCTION_tag(9a1cb246f3d48936).(reader, context, component);
1088 }
1089
1090 static int _oval_component_parse_TIMEDIF_tagcxx . . $ _oval_component_parse_TIMEDIF_tag(9a1cb246f3d48936).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader,
1091 struct oval_parser_contextcxx . . $ oval_parser_context# *context, struct oval_componentcxx . . $ oval_component# *component)
1092 {
1093
1094 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
1095
1096 oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t# *timedif = (oval_component_TIMEDIF_tcxx . . $ oval_component_TIMEDIF_t# *) component;
1097 oval_datetime_format_tcxx . . $ oval_datetime_format_t# format_1 = oval_datetime_format_parsecxx . . $ oval_datetime_format_parse(6c919641a96a6c4c).(reader, "format_1",
1098 OVAL_DATETIME_YEAR_MONTH_DAYcxx . . $ OVAL_DATETIME_YEAR_MONTH_DAY.);
1099 oval_datetime_format_tcxx . . $ oval_datetime_format_t# format_2 = oval_datetime_format_parsecxx . . $ oval_datetime_format_parse(6c919641a96a6c4c).(reader, "format_2",
1100 OVAL_DATETIME_YEAR_MONTH_DAYcxx . . $ OVAL_DATETIME_YEAR_MONTH_DAY.);
1101 timedif->format_1cxx . . $ oval_component_TIMEDIF#format_1. = format_1;
1102 timedif->format_2cxx . . $ oval_component_TIMEDIF#format_2. = format_2;
1103
1104 return _oval_component_parse_FUNCTION_tagcxx . . $ _oval_component_parse_FUNCTION_tag(9a1cb246f3d48936).(reader, context, component);
1105 }
1106
1107 static int _oval_component_parse_REGEX_CAPTURE_tagcxx . . $ _oval_component_parse_REGEX_CAPTURE_tag(9a1cb246f3d48936).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader,
1108 struct oval_parser_contextcxx . . $ oval_parser_context# *context,
1109 struct oval_componentcxx . . $ oval_component# *component)
1110 {
1111 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
1112
1113 oval_component_REGEX_CAPTURE_tcxx . . $ oval_component_REGEX_CAPTURE_t# *regex = (oval_component_REGEX_CAPTURE_tcxx . . $ oval_component_REGEX_CAPTURE_t# *) component;
1114
1115 regex->patterncxx . . $ oval_component_REGEX_CAPTURE#pattern. = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "pattern");
1116
1117 return _oval_component_parse_FUNCTION_tagcxx . . $ _oval_component_parse_FUNCTION_tag(9a1cb246f3d48936).(reader, context, component);
1118 }
1119
1120 int oval_component_parse_tagcxx . . $ oval_component_parse_tag(43578c87bd82b671).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader,
1121 struct oval_parser_contextcxx . . $ oval_parser_context# *context, oval_component_consumercxx . . $ oval_component_consumer# consumer, void *user)
1122 {
1123
1124 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(context);
1125
1126 int return_code = 0;
1127
1128 struct oval_definition_modelcxx . . $ oval_definition_model# *model = context->definition_modelcxx . . $ oval_parser_context#definition_model.;
1129 char *tagname = (char *)xmlTextReaderLocalNamecxx . . $ xmlTextReaderLocalName(3322afb275581432).(reader);
1130 /* oval_component_type_enum type; */
1131 struct oval_componentcxx . . $ oval_component# *component = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1132 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "literal_component") == 0) {
1133 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_COMPONENT_LITERALcxx . . $ OVAL_COMPONENT_LITERAL.);
1134 return_code = _oval_component_parse_LITERAL_tagcxx . . $ _oval_component_parse_LITERAL_tag(9a1cb246f3d48936).(reader, context, component);
1135 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "object_component") == 0) {
1136 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_COMPONENT_OBJECTREFcxx . . $ OVAL_COMPONENT_OBJECTREF.);
1137 return_code = _oval_component_parse_OBJECTREF_tagcxx . . $ _oval_component_parse_OBJECTREF_tag(9a1cb246f3d48936).(reader, context, component);
1138 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "variable_component") == 0) {
1139 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_COMPONENT_VARREFcxx . . $ OVAL_COMPONENT_VARREF.);
1140 return_code = _oval_component_parse_VARREF_tagcxx . . $ _oval_component_parse_VARREF_tag(9a1cb246f3d48936).(reader, context, component);
1141 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "arithmetic") == 0) {
1142 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_FUNCTION_ARITHMETICcxx . . $ OVAL_FUNCTION_ARITHMETIC.);
1143 return_code = _oval_component_parse_ARITHMETIC_tagcxx . . $ _oval_component_parse_ARITHMETIC_tag(9a1cb246f3d48936).(reader, context, component);
1144 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "begin") == 0) {
1145 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_FUNCTION_BEGINcxx . . $ OVAL_FUNCTION_BEGIN.);
1146 return_code = _oval_component_parse_BEGEND_tagcxx . . $ _oval_component_parse_BEGEND_tag(9a1cb246f3d48936).(reader, context, component);
1147 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "concat") == 0) {
1148 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_FUNCTION_CONCATcxx . . $ OVAL_FUNCTION_CONCAT.);
1149 return_code = _oval_component_parse_FUNCTION_tagcxx . . $ _oval_component_parse_FUNCTION_tag(9a1cb246f3d48936).(reader, context, component);
1150 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "count") == 0) {
1151 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_FUNCTION_COUNTcxx . . $ OVAL_FUNCTION_COUNT.);
1152 return_code = _oval_component_parse_FUNCTION_tagcxx . . $ _oval_component_parse_FUNCTION_tag(9a1cb246f3d48936).(reader, context, component);
1153 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "unique") == 0) {
1154 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_FUNCTION_UNIQUEcxx . . $ OVAL_FUNCTION_UNIQUE.);
1155 return_code = _oval_component_parse_FUNCTION_tagcxx . . $ _oval_component_parse_FUNCTION_tag(9a1cb246f3d48936).(reader, context, component);
1156 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "end") == 0) {
1157 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_FUNCTION_ENDcxx . . $ OVAL_FUNCTION_END.);
1158 return_code = _oval_component_parse_BEGEND_tagcxx . . $ _oval_component_parse_BEGEND_tag(9a1cb246f3d48936).(reader, context, component);
1159 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "escape_regex") == 0) {
1160 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_FUNCTION_ESCAPE_REGEXcxx . . $ OVAL_FUNCTION_ESCAPE_REGEX.);
1161 return_code = _oval_component_parse_FUNCTION_tagcxx . . $ _oval_component_parse_FUNCTION_tag(9a1cb246f3d48936).(reader, context, component);
1162 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "glob_to_regex") == 0) {
1163 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_FUNCTION_GLOB_TO_REGEXcxx . . $ OVAL_FUNCTION_GLOB_TO_REGEX.);
1164 return_code = _oval_component_parse_GLOB_TO_REGEX_tagcxx . . $ _oval_component_parse_GLOB_TO_REGEX_tag(9a1cb246f3d48936).(reader, context, component);
1165 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "split") == 0) {
1166 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_FUNCTION_SPLITcxx . . $ OVAL_FUNCTION_SPLIT.);
1167 return_code = _oval_component_parse_SPLIT_tagcxx . . $ _oval_component_parse_SPLIT_tag(9a1cb246f3d48936).(reader, context, component);
1168 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "substring") == 0) {
1169 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_FUNCTION_SUBSTRINGcxx . . $ OVAL_FUNCTION_SUBSTRING.);
1170 return_code = _oval_component_parse_SUBSTRING_tagcxx . . $ _oval_component_parse_SUBSTRING_tag(9a1cb246f3d48936).(reader, context, component);
1171 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "time_difference") == 0) {
1172 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_FUNCTION_TIMEDIFcxx . . $ OVAL_FUNCTION_TIMEDIF.);
1173 return_code = _oval_component_parse_TIMEDIF_tagcxx . . $ _oval_component_parse_TIMEDIF_tag(9a1cb246f3d48936).(reader, context, component);
1174 } else if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(tagname, "regex_capture") == 0) {
1175 component = oval_component_newcxx . . $ oval_component_new(5a03942b011204b8).(model, OVAL_FUNCTION_REGEX_CAPTUREcxx . . $ OVAL_FUNCTION_REGEX_CAPTURE.);
1176 return_code = _oval_component_parse_REGEX_CAPTURE_tagcxx . . $ _oval_component_parse_REGEX_CAPTURE_tag(9a1cb246f3d48936).(reader, context, component);
1177 } else {
1178 dDcxx . . $ `src/common/debug_priv.h:64:9`!("Tag <%s> not handled, line: %d.", tagname,
1179 xmlTextReaderGetParserLineNumber(reader));
1180 return_code = oval_parser_skip_tagcxx . . $ oval_parser_skip_tag(b61d4daae99e998a).(reader, context);
1181 }
1182 if (component != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1183 (*consumer) (component, user);
1184
1185 if (return_code != 0 ) {
1186 dWcxx . . $ `src/common/debug_priv.h:62:9`!("Parsing of <%s> terminated by an error at line %d.", tagname, xmlTextReaderGetParserLineNumber(reader));
1187 }
1188 freecxx . . $ free(5d22bdacc48458e8).(tagname);
1189 return return_code;
1190 }
1191
1192 xmlNodecxx . . $ xmlNode# *oval_component_to_domcxx . . $ oval_component_to_dom(196ec219b578179).(struct oval_componentcxx . . $ oval_component# *component, xmlDoccxx . . $ xmlDoc# * doc, xmlNodecxx . . $ xmlNode# * parent)
1193 {
1194 oval_component_type_tcxx . . $ oval_component_type_t# type = oval_component_get_typecxx . . $ oval_component_get_type(18aaf682e9b84bf).(component);
1195 const char *local_name = type < OVAL_FUNCTIONcxx . . $ `src/OVAL/public/oval_definitions.h:199:9`!
1196 ? _OVAL_COMPONENT_MAPcxx . . $ _OVAL_COMPONENT_MAP.[type - 1].stringcxx . . $ oscap_string_map#string. : _OVAL_FUNCTION_MAPcxx . . $ _OVAL_FUNCTION_MAP.[type - OVAL_FUNCTIONcxx . . $ `src/OVAL/public/oval_definitions.h:199:9`! - 1].stringcxx . . $ oscap_string_map#string.;
1197
1198 char *content;
1199 if (type == OVAL_COMPONENT_LITERALcxx . . $ OVAL_COMPONENT_LITERAL.) {
1200 struct oval_valuecxx . . $ oval_value# *value = oval_component_get_literal_valuecxx . . $ oval_component_get_literal_value(1a03149cd032edc5).(component);
1201 content = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(value);
1202 } else {
1203 content = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1204 }
1205
1206 xmlNscxx . . $ xmlNs# *ns_definitions = xmlSearchNsByHrefcxx . . $ xmlSearchNsByHref(d0fb0b6b99319c4).(doc, parent, OVAL_DEFINITIONS_NAMESPACEcxx . . $ `src/OVAL/oval_agent_api_impl.h:50:9`!);
1207 xmlNodecxx . . $ xmlNode# *component_node = xmlNewTextChildcxx . . $ xmlNewTextChild(4c74f4d7754e7bc8).(parent, ns_definitions,
1208 BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! local_name,
1209 BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! content);
1210
1211 switch (oval_component_get_typecxx . . $ oval_component_get_type(18aaf682e9b84bf).(component)) {
1212 case OVAL_COMPONENT_LITERALcxx . . $ OVAL_COMPONENT_LITERAL.:{
1213 struct oval_valuecxx . . $ oval_value# *value = oval_component_get_literal_valuecxx . . $ oval_component_get_literal_value(1a03149cd032edc5).(component);
1214 oval_datatype_tcxx . . $ oval_datatype_t# datatype = oval_value_get_datatypecxx . . $ oval_value_get_datatype(9f2201a27f3b3b4).(value);
1215 if (datatype != OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING.)
1216 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).
1217 (component_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "datatype", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! oval_datatype_get_textcxx . . $ oval_datatype_get_text(a950b89baeb79474).(datatype));
1218 }
1219 break;
1220 case OVAL_COMPONENT_OBJECTREFcxx . . $ OVAL_COMPONENT_OBJECTREF.:{
1221 char *item_field, *record_field;
1222 struct oval_objectcxx . . $ oval_object# *object = oval_component_get_objectcxx . . $ oval_component_get_object(cf0080289f144598).(component);
1223 char *object_ref = oval_object_get_idcxx . . $ oval_object_get_id(c789946d38fecc83).(object);
1224 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(component_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "object_ref", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! object_ref);
1225 item_field = oval_component_get_item_fieldcxx . . $ oval_component_get_item_field(801bf966f21b1bfa).(component);
1226 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(component_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "item_field", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! item_field);
1227 record_field = oval_component_get_record_fieldcxx . . $ oval_component_get_record_field(801bf966f21b1bfa).(component);
1228 if (record_field)
1229 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(component_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "record_field", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! record_field);
1230 } break;
1231 case OVAL_COMPONENT_VARREFcxx . . $ OVAL_COMPONENT_VARREF.:{
1232 struct oval_variablecxx . . $ oval_variable# *variable = oval_component_get_variablecxx . . $ oval_component_get_variable(8ebdb0279366b4eb).(component);
1233 char *var_ref = oval_variable_get_idcxx . . $ oval_variable_get_id(341a3c7e6ea3818b).(variable);
1234 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(component_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "var_ref", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! var_ref);
1235
1236 } break;
1237 case OVAL_FUNCTION_ARITHMETICcxx . . $ OVAL_FUNCTION_ARITHMETIC.:{
1238 oval_arithmetic_operation_tcxx . . $ oval_arithmetic_operation_t# operation = oval_component_get_arithmetic_operationcxx . . $ oval_component_get_arithmetic_operation(ba8405f156bed481).(component);
1239 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).
1240 (component_node,
1241 BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "arithmetic_operation", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! oval_arithmetic_operation_get_textcxx . . $ oval_arithmetic_operation_get_text(332be96235330397).(operation));
1242 }
1243 break;
1244 case OVAL_FUNCTION_BEGINcxx . . $ OVAL_FUNCTION_BEGIN.:{
1245 char *character = oval_component_get_prefixcxx . . $ oval_component_get_prefix(801bf966f21b1bfa).(component);
1246 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(component_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "character", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! character);
1247 } break;
1248 case OVAL_FUNCTION_ENDcxx . . $ OVAL_FUNCTION_END.:{
1249 char *character = oval_component_get_suffixcxx . . $ oval_component_get_suffix(801bf966f21b1bfa).(component);
1250 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(component_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "character", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! character);
1251 } break;
1252 case OVAL_FUNCTION_SUBSTRINGcxx . . $ OVAL_FUNCTION_SUBSTRING.:{
1253 int start = oval_component_get_substring_startcxx . . $ oval_component_get_substring_start(5e31221d32e7dfb3).(component);
1254 char substring_start[10];
1255 *substring_start = '\0';
1256 snprintfcxx . . $ snprintf(ea502d73e74c754c).(substring_start, sizeof(substring_start), "%d", start);
1257 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(component_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "substring_start", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! substring_start);
1258 int length = oval_component_get_substring_lengthcxx . . $ oval_component_get_substring_length(5e31221d32e7dfb3).(component);
1259 char substring_length[10];
1260 *substring_length = '\0';
1261 snprintfcxx . . $ snprintf(ea502d73e74c754c).(substring_length, sizeof(substring_length), "%d", length);
1262 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(component_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "substring_length", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! substring_length);
1263 }
1264 break;
1265 case OVAL_FUNCTION_TIMEDIFcxx . . $ OVAL_FUNCTION_TIMEDIF.:{
1266 oval_datetime_format_tcxx . . $ oval_datetime_format_t# format_1 = oval_component_get_timedif_format_1cxx . . $ oval_component_get_timedif_format_1(723469270ffc4aa3).(component);
1267 if (format_1 != OVAL_DATETIME_YEAR_MONTH_DAYcxx . . $ OVAL_DATETIME_YEAR_MONTH_DAY.) {
1268 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).
1269 (component_node,
1270 BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "format_1", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! oval_datetime_format_get_textcxx . . $ oval_datetime_format_get_text(2ef2cbc4ca1a59f0).(format_1));
1271 }
1272 oval_datetime_format_tcxx . . $ oval_datetime_format_t# format_2 = oval_component_get_timedif_format_2cxx . . $ oval_component_get_timedif_format_2(723469270ffc4aa3).(component);
1273 if (format_2 != OVAL_DATETIME_YEAR_MONTH_DAYcxx . . $ OVAL_DATETIME_YEAR_MONTH_DAY.) {
1274 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).
1275 (component_node,
1276 BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "format_2", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! oval_datetime_format_get_textcxx . . $ oval_datetime_format_get_text(2ef2cbc4ca1a59f0).(format_2));
1277 }
1278 }
1279 break;
1280 case OVAL_FUNCTION_REGEX_CAPTUREcxx . . $ OVAL_FUNCTION_REGEX_CAPTURE.:{
1281 char *pattern = oval_component_get_regex_patterncxx . . $ oval_component_get_regex_pattern(801bf966f21b1bfa).(component);
1282 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(component_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "pattern", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! pattern);
1283 } break;
1284 case OVAL_FUNCTION_SPLITcxx . . $ OVAL_FUNCTION_SPLIT.:{
1285 char * delimiter = oval_component_get_split_delimitercxx . . $ oval_component_get_split_delimiter(801bf966f21b1bfa).(component);
1286 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(component_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "delimiter", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! delimiter);
1287 } break;
1288 case OVAL_FUNCTION_GLOB_TO_REGEXcxx . . $ OVAL_FUNCTION_GLOB_TO_REGEX.:{
1289 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! glob_noescape = oval_component_get_glob_to_regex_glob_noescapecxx . . $ oval_component_get_glob_to_regex_glob_noescape(a3cfe8b68df8b786).(component);
1290 if (glob_noescape) {
1291 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(component_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "glob_noescape", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "true");
1292 } else {
1293 xmlNewPropcxx . . $ xmlNewProp(6ee5a6130c40eb8b).(component_node, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "glob_noescape", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "false");
1294 }
1295 } break;
1296 case OVAL_FUNCTION_CONCATcxx . . $ OVAL_FUNCTION_CONCAT.:
1297 case OVAL_FUNCTION_ESCAPE_REGEXcxx . . $ OVAL_FUNCTION_ESCAPE_REGEX.:
1298 break;
1299 default:
1300 break;
1301 }
1302
1303 if (type > OVAL_FUNCTIONcxx . . $ `src/OVAL/public/oval_definitions.h:199:9`!) {
1304 struct oval_component_iteratorcxx . . $ oval_component_iterator# *components = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(component);
1305 while (oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(components)) {
1306 struct oval_componentcxx . . $ oval_component# *sub_component = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(components);
1307 oval_component_to_domcxx . . $ oval_component_to_dom(196ec219b578179).(sub_component, doc, component_node);
1308 }
1309 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(components);
1310 }
1311
1312 return component_node;
1313 }
1314
1315 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
1316 struct oval_componentcxx . . $ oval_component# *component,
1317 struct oval_collectioncxx . . $ oval_collection# *value_collection);
1318
1319 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_LITERALcxx . . $ _oval_component_evaluate_LITERAL(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
1320 struct oval_componentcxx . . $ oval_component# *component,
1321 struct oval_collectioncxx . . $ oval_collection# *value_collection)
1322 {
1323 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
1324
1325 struct oval_component_LITERALcxx . . $ oval_component_LITERAL# *literal = (struct oval_component_LITERALcxx . . $ oval_component_LITERAL# *)component;
1326 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, oval_value_clonecxx . . $ oval_value_clone(5de282da9e151d11).(literal->valuecxx . . $ oval_component_LITERAL#value.));
1327 return SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.;
1328 }
1329
1330 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_OBJECTREFcxx . . $ _oval_component_evaluate_OBJECTREF(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
1331 struct oval_componentcxx . . $ oval_component# *component,
1332 struct oval_collectioncxx . . $ oval_collection# *value_collection)
1333 {
1334 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
1335
1336 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
1337
1338 struct oval_component_OBJECTREFcxx . . $ oval_component_OBJECTREF# *objref = (struct oval_component_OBJECTREFcxx . . $ oval_component_OBJECTREF# *)component;
1339 struct oval_objectcxx . . $ oval_object# *object = objref->objectcxx . . $ oval_component_OBJECTREF#object.;
1340 struct oval_syscharcxx . . $ oval_syschar# *syschar;
1341
1342 if (!object)
1343 return flag;
1344
1345 const char *obj_id = oval_object_get_idcxx . . $ oval_object_get_id(c789946d38fecc83).(object);
1346 dIcxx . . $ `src/common/debug_priv.h:61:9`!("Variable component references to object '%s'.", obj_id);
1347
1348 if (argu->modecxx . . $ $anonymous_type_5129a7513b63d2fa_0#mode. == OVAL_MODE_QUERYcxx . . $ $anonymous_type_5129a7513b63d2fa_0#OVAL_MODE_QUERY.) {
1349 #if defined(OVAL_PROBES_ENABLEDcxx . . $ `build/config.h:67:9`!)
1350 if (oval_probe_query_objectcxx . . $ oval_probe_query_object(c2fefbf93109479a).(argu->ucxx . . $ $anonymous_type_5129a7513b63d2fa_0#u..sesscxx . . $ $anonymous_type_5129a7513b63d2fa_0#$anonymous_type_2#sess., object, 0, &syschar) != 0)
1351 return flag;
1352 #else
1353 return SYSCHAR_FLAG_ERROR;
1354 #endif
1355 } else {
1356 syschar = oval_syschar_model_get_syscharcxx . . $ oval_syschar_model_get_syschar(5e0330551a5ec218).(argu->ucxx . . $ $anonymous_type_5129a7513b63d2fa_0#u..sysmodcxx . . $ $anonymous_type_5129a7513b63d2fa_0#$anonymous_type_2#sysmod., obj_id);
1357 }
1358
1359 if (syschar) {
1360 char *ifield_name, *rfield_name;
1361
1362 flag = oval_syschar_get_flagcxx . . $ oval_syschar_get_flag(faee96ff7b702646).(syschar);
1363 ifield_name = objref->item_fieldcxx . . $ oval_component_OBJECTREF#item_field.;
1364 rfield_name = objref->record_fieldcxx . . $ oval_component_OBJECTREF#record_field.;
1365 struct oval_sysitem_iteratorcxx . . $ oval_sysitem_iterator# *sysitems = oval_syschar_get_sysitemcxx . . $ oval_syschar_get_sysitem(4522ba9011fcd99).(syschar);
1366 while (oval_sysitem_iterator_has_morecxx . . $ oval_sysitem_iterator_has_more(199ed6c71fdbb36b).(sysitems)) {
1367 struct oval_sysitemcxx . . $ oval_sysitem# *sysitem = oval_sysitem_iterator_nextcxx . . $ oval_sysitem_iterator_next(310575caa1da8688).(sysitems);
1368 struct oval_sysent_iteratorcxx . . $ oval_sysent_iterator# *sysent_itr = oval_sysitem_get_sysentscxx . . $ oval_sysitem_get_sysents(bf4f75dc7c1645cb).(sysitem);
1369 const char *oval_sysitem_id = oval_sysitem_get_idcxx . . $ oval_sysitem_get_id(d34333a20a23cb5d).(sysitem);
1370 const char *oval_sysitem_subtype = oval_subtype_to_strcxx . . $ oval_subtype_to_str(ee6b3dcae047e21f).(oval_sysitem_get_subtypecxx . . $ oval_sysitem_get_subtype(bdd5254a93e1634f).(sysitem));
1371 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! entity_matched = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1372 while (oval_sysent_iterator_has_morecxx . . $ oval_sysent_iterator_has_more(59acec8e8c3c2bb8).(sysent_itr)) {
1373 oval_datatype_tcxx . . $ oval_datatype_t# dt;
1374 struct oval_sysentcxx . . $ oval_sysent# *sysent = oval_sysent_iterator_nextcxx . . $ oval_sysent_iterator_next(4140414cfcc52c9e).(sysent_itr);
1375 char *sysent_name = oval_sysent_get_namecxx . . $ oval_sysent_get_name(cdd7c218673d284b).(sysent);
1376
1377 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(ifield_name, sysent_name))
1378 continue;
1379
1380 entity_matched = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1381 dt = oval_sysent_get_datatypecxx . . $ oval_sysent_get_datatype(41d54f612a581adb).(sysent);
1382 if (dt == OVAL_DATATYPE_RECORDcxx . . $ OVAL_DATATYPE_RECORD. && rfield_name == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
1383 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!,
1384 "Unexpected record data type in %s_item (id: %s) specified by object '%s'.",
1385 oval_sysitem_subtype, oval_sysitem_id, obj_id);
1386 oval_sysent_iterator_freecxx . . $ oval_sysent_iterator_free(f5d8b29a351f840a).(sysent_itr);
1387 oval_sysitem_iterator_freecxx . . $ oval_sysitem_iterator_free(bdd00e768e40dec5).(sysitems);
1388 return SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
1389 }
1390 if (dt != OVAL_DATATYPE_RECORDcxx . . $ OVAL_DATATYPE_RECORD. && rfield_name != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
1391 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!,
1392 "Expected record data type, but found %s data type in %s entity in %s_item (id: %s) specified by object '%s'.",
1393 oval_datatype_get_text(dt), ifield_name, oval_sysitem_subtype, oval_sysitem_id, obj_id);
1394 oval_sysent_iterator_freecxx . . $ oval_sysent_iterator_free(f5d8b29a351f840a).(sysent_itr);
1395 oval_sysitem_iterator_freecxx . . $ oval_sysitem_iterator_free(bdd00e768e40dec5).(sysitems);
1396 return SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
1397 }
1398
1399 if (dt == OVAL_DATATYPE_RECORDcxx . . $ OVAL_DATATYPE_RECORD.) {
1400 struct oval_record_field_iteratorcxx . . $ oval_record_field_iterator# *rf_itr;
1401 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! field_matched = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1402
1403 rf_itr = oval_sysent_get_record_fieldscxx . . $ oval_sysent_get_record_fields(f7c5d78b86516de6).(sysent);
1404 while (oval_record_field_iterator_has_morecxx . . $ oval_record_field_iterator_has_more(f257abe5c2e43c5d).(rf_itr)) {
1405 struct oval_record_fieldcxx . . $ oval_record_field# *rf;
1406 char *txtval;
1407 struct oval_valuecxx . . $ oval_value# *val;
1408
1409 rf = oval_record_field_iterator_nextcxx . . $ oval_record_field_iterator_next(7c2c0ee515333432).(rf_itr);
1410 txtval = oval_record_field_get_namecxx . . $ oval_record_field_get_name(f090a65955c953b6).(rf);
1411 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88).(rfield_name, txtval))
1412 continue;
1413
1414 field_matched = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1415 dt = oval_record_field_get_datatypecxx . . $ oval_record_field_get_datatype(5e8d642923d2495b).(rf);
1416 txtval = oval_record_field_get_valuecxx . . $ oval_record_field_get_value(f090a65955c953b6).(rf);
1417 val = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(dt, txtval);
1418 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, val);
1419 }
1420 /* throw error if none matched */
1421 if (!field_matched) {
1422 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!,
1423 "Record field '%s' has not been found in %s_item (id: %s) specified by object '%s'.",
1424 rfield_name, oval_sysitem_subtype, oval_sysitem_id, obj_id);
1425 oval_record_field_iterator_freecxx . . $ oval_record_field_iterator_free(6968805da7579f07).(rf_itr);
1426 oval_sysent_iterator_freecxx . . $ oval_sysent_iterator_free(f5d8b29a351f840a).(sysent_itr);
1427 oval_sysitem_iterator_freecxx . . $ oval_sysitem_iterator_free(bdd00e768e40dec5).(sysitems);
1428 return SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
1429 }
1430 oval_record_field_iterator_freecxx . . $ oval_record_field_iterator_free(6968805da7579f07).(rf_itr);
1431 } else {
1432 char *txtval;
1433 struct oval_valuecxx . . $ oval_value# *val;
1434
1435 txtval = oval_sysent_get_valuecxx . . $ oval_sysent_get_value(cdd7c218673d284b).(sysent);
1436 val = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(dt, txtval);
1437 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, val);
1438 }
1439 }
1440 /* throw error if none matched */
1441 if (!entity_matched) {
1442 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!,
1443 "Entity '%s' has not been found in %s_item (id: %s) specified by object '%s'.",
1444 ifield_name, oval_sysitem_subtype, oval_sysitem_id, obj_id);
1445 oval_sysent_iterator_freecxx . . $ oval_sysent_iterator_free(f5d8b29a351f840a).(sysent_itr);
1446 oval_sysitem_iterator_freecxx . . $ oval_sysitem_iterator_free(bdd00e768e40dec5).(sysitems);
1447 return SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
1448 }
1449 oval_sysent_iterator_freecxx . . $ oval_sysent_iterator_free(f5d8b29a351f840a).(sysent_itr);
1450 }
1451 oval_sysitem_iterator_freecxx . . $ oval_sysitem_iterator_free(bdd00e768e40dec5).(sysitems);
1452 }
1453
1454 return flag;
1455 }
1456
1457 #define _HAS_VALUEScxx . . $ `src/OVAL/oval_component.c:1457:9`!(flag) (flag==SYSCHAR_FLAG_COMPLETE || flag==SYSCHAR_FLAG_INCOMPLETE)
1458 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_VARREFcxx . . $ _oval_component_evaluate_VARREF(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
1459 struct oval_componentcxx . . $ oval_component# *component,
1460 struct oval_collectioncxx . . $ oval_collection# *value_collection)
1461 {
1462 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
1463
1464 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
1465 struct oval_component_VARREFcxx . . $ oval_component_VARREF# *varref = (struct oval_component_VARREFcxx . . $ oval_component_VARREF# *)component;
1466 struct oval_variablecxx . . $ oval_variable# *variable = varref->variablecxx . . $ oval_component_VARREF#variable.;
1467
1468 if (!variable) {
1469 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!, "No variable bound to VARREF componenet");
1470 return flag;
1471 }
1472
1473 dIndentcxx . . $ `src/common/debug_priv.h:66:9`!(1);
1474 dIcxx . . $ `src/common/debug_priv.h:61:9`!("Variable component references %s '%s'",
1475 oval_variable_type_get_text(oval_variable_get_type(variable)),
1476 oval_variable_get_id(variable));
1477
1478 if (argu->modecxx . . $ $anonymous_type_5129a7513b63d2fa_0#mode. == OVAL_MODE_QUERYcxx . . $ $anonymous_type_5129a7513b63d2fa_0#OVAL_MODE_QUERY.) {
1479 #if defined(OVAL_PROBES_ENABLEDcxx . . $ `build/config.h:67:9`!)
1480 if (oval_probe_query_variablecxx . . $ oval_probe_query_variable(257bd925b7be383d).(argu->ucxx . . $ $anonymous_type_5129a7513b63d2fa_0#u..sesscxx . . $ $anonymous_type_5129a7513b63d2fa_0#$anonymous_type_2#sess., variable) != 0) {
1481 dIndentcxx . . $ `src/common/debug_priv.h:66:9`!(-1);
1482 return flag;
1483 }
1484 #else
1485 return SYSCHAR_FLAG_ERROR;
1486 #endif
1487 } else {
1488 if (oval_syschar_model_compute_variablecxx . . $ oval_syschar_model_compute_variable(64fb93a449c1c5bc).(argu->ucxx . . $ $anonymous_type_5129a7513b63d2fa_0#u..sysmodcxx . . $ $anonymous_type_5129a7513b63d2fa_0#$anonymous_type_2#sysmod., variable) != 0) {
1489 dIndentcxx . . $ `src/common/debug_priv.h:66:9`!(-1);
1490 return flag;
1491 }
1492 }
1493
1494 flag = oval_variable_get_collection_flagcxx . . $ oval_variable_get_collection_flag(e1154c96d0101da8).(variable);
1495 if (_HAS_VALUEScxx . . $ `src/OVAL/oval_component.c:1457:9`!(flag)) {
1496 struct oval_value_iteratorcxx . . $ oval_value_iterator# *values = oval_variable_get_valuescxx . . $ oval_variable_get_values(325344158909f348).(variable);
1497 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(values)) {
1498 struct oval_valuecxx . . $ oval_value# *value = oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(values);
1499 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, oval_value_clonecxx . . $ oval_value_clone(5de282da9e151d11).(value));
1500 }
1501 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(values);
1502 }
1503
1504 dIndentcxx . . $ `src/common/debug_priv.h:66:9`!(-1);
1505 return flag;
1506 }
1507
1508 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_BEGINcxx . . $ _oval_component_evaluate_BEGIN(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
1509 struct oval_componentcxx . . $ oval_component# *component,
1510 struct oval_collectioncxx . . $ oval_collection# *value_collection)
1511 {
1512 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
1513 char *prefix = oval_component_get_prefixcxx . . $ oval_component_get_prefix(801bf966f21b1bfa).(component);
1514 if (prefix) {
1515 int len_prefix = strlencxx . . $ strlen(751346f8406fd082).(prefix);
1516 struct oval_component_iteratorcxx . . $ oval_component_iterator# *subcomps = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(component);
1517 if (oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps)) { /*only the first component is processed */
1518 struct oval_collectioncxx . . $ oval_collection# *subcoll = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
1519 struct oval_componentcxx . . $ oval_component# *subcomp = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(subcomps);
1520 flag = oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(argu, subcomp, subcoll);
1521 struct oval_value_iteratorcxx . . $ oval_value_iterator# *values =
1522 (struct oval_value_iteratorcxx . . $ oval_value_iterator# *)oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(subcoll);
1523 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(values)) {
1524 char *key = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(values));
1525 const size_t concat_len = len_prefix + strlencxx . . $ strlen(751346f8406fd082).(key) + 1;
1526 char *concat = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(concat_len);
1527 if (strncmpcxx . . $ strncmp(fd278af2f295fa2e).(prefix, key, len_prefix)) {
1528 snprintfcxx . . $ snprintf(ea502d73e74c754c).(concat, concat_len, "%s%s", prefix, key);
1529 } else {
1530 snprintfcxx . . $ snprintf(ea502d73e74c754c).(concat, concat_len, "%s", key);
1531 }
1532 struct oval_valuecxx . . $ oval_value# *concat_value = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING., concat);
1533 freecxx . . $ free(5d22bdacc48458e8).(concat);
1534 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, concat_value);
1535 }
1536 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(values);
1537 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(subcoll, (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
1538 }
1539 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
1540 } else {
1541 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!, "No prefix specified for component evaluation");
1542 }
1543 return flag;
1544 }
1545
1546 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_ENDcxx . . $ _oval_component_evaluate_END(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
1547 struct oval_componentcxx . . $ oval_component# *component,
1548 struct oval_collectioncxx . . $ oval_collection# *value_collection) {
1549 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
1550 char *suffix = oval_component_get_suffixcxx . . $ oval_component_get_suffix(801bf966f21b1bfa).(component);
1551 if (suffix) {
1552 int len_suffix = strlencxx . . $ strlen(751346f8406fd082).(suffix);
1553 struct oval_component_iteratorcxx . . $ oval_component_iterator# *subcomps = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(component);
1554 if (oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps)) { /*only the first component is processed */
1555 struct oval_collectioncxx . . $ oval_collection# *subcoll = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
1556 struct oval_componentcxx . . $ oval_component# *subcomp = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(subcomps);
1557 flag = oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(argu, subcomp, subcoll);
1558 struct oval_value_iteratorcxx . . $ oval_value_iterator# *values =
1559 (struct oval_value_iteratorcxx . . $ oval_value_iterator# *)oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(subcoll);
1560 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(values)) {
1561 char *key = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(values));
1562 int len_key = strlencxx . . $ strlen(751346f8406fd082).(key);
1563 const size_t concat_len = len_suffix + len_key + 1;
1564 char *concat = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(concat_len);
1565 if ((len_suffix > len_key) || strncmpcxx . . $ strncmp(fd278af2f295fa2e).(suffix, key + len_key - len_suffix, len_suffix)) {
1566 snprintfcxx . . $ snprintf(ea502d73e74c754c).(concat, concat_len, "%s%s", key, suffix);
1567 } else {
1568 snprintfcxx . . $ snprintf(ea502d73e74c754c).(concat, concat_len, "%s", key);
1569 }
1570 struct oval_valuecxx . . $ oval_value# *concat_value = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING., concat);
1571 freecxx . . $ free(5d22bdacc48458e8).(concat);
1572 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, concat_value);
1573 }
1574 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(values);
1575 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(subcoll, (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
1576 }
1577 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
1578 } else {
1579 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!, "No suffix specified for component evaluation");
1580 }
1581 return flag;
1582 }
1583
1584 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_CONCATcxx . . $ _oval_component_evaluate_CONCAT(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
1585 struct oval_componentcxx . . $ oval_component# *component,
1586 struct oval_collectioncxx . . $ oval_collection# *value_collection)
1587 {
1588 int idx0 = 0;
1589
1590 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.;
1591 struct oval_component_iteratorcxx . . $ oval_component_iterator# *subcomps = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(component);
1592 int len_subcomps = oval_component_iterator_remainingcxx . . $ oval_component_iterator_remaining(360b25b6bb1e1ca7).(subcomps);
1593 struct oval_collectioncxx . . $ oval_collection# **component_colls = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(len_subcomps * sizeof(struct oval_collectioncxx . . $ oval_collection# *));
1594 for (idx0 = 0; oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps); idx0++) {
1595 struct oval_collectioncxx . . $ oval_collection# *subcoll = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
1596 struct oval_componentcxx . . $ oval_component# *subcomp = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(subcomps);
1597 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# subflag = oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(argu, subcomp, subcoll);
1598 flag = _AGG_FLAGcxx . . $ `src/OVAL/oval_component.c:106:9`!(flag, subflag);
1599 component_colls[idx0] = subcoll;
1600 }
1601 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! not_finished = (len_subcomps > 0) && _HAS_VALUEScxx . . $ `src/OVAL/oval_component.c:1457:9`!(flag);
1602 if (not_finished) {
1603 struct oval_value_iteratorcxx . . $ oval_value_iterator# **values = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(len_subcomps * sizeof(struct oval_value_iteratorcxx . . $ oval_value_iterator# *));
1604 /* bool has_some[len_subcomps]; <-- unused variable */
1605 not_finished = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1606 char **texts = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(len_subcomps * sizeof(char *));
1607 int *counts = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(len_subcomps * sizeof(int));
1608 int catnum = 1;
1609 for (idx0 = 0; idx0 < len_subcomps; idx0++) {
1610 struct oval_value_iteratorcxx . . $ oval_value_iterator# *comp_values =
1611 (struct oval_value_iteratorcxx . . $ oval_value_iterator# *)oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(component_colls[idx0]);
1612 counts[idx0] = oval_value_iterator_remainingcxx . . $ oval_value_iterator_remaining(4724f34e41a7ec75).(comp_values);
1613 if (counts[idx0]) {
1614 /* int dbgnum = catnum; <-- unused variable */
1615 catnum = catnum * counts[idx0];
1616 values[idx0] = comp_values;
1617 texts[idx0] = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(comp_values));
1618 not_finished = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1619 } else {
1620 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(comp_values);
1621 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(component_colls[idx0],
1622 (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
1623 component_colls[idx0] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1624 values[idx0] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1625 texts[idx0] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
1626 }
1627 }
1628 for (int passnum = 1; passnum - 1 < catnum; passnum++) {
1629 int len_cat = 1;
1630 for (idx0 = 0; idx0 < len_subcomps; idx0++)
1631 if (texts[idx0])
1632 len_cat += strlencxx . . $ strlen(751346f8406fd082).(texts[idx0]);
1633 char *concat = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(len_cat);
1634 *concat = '\0';
1635 for (idx0 = 0; idx0 < len_subcomps; idx0++)
1636 if (texts[idx0])
1637 strcatcxx . . $ strcat(b7b3a83273496486).(concat, texts[idx0]);
1638 struct oval_valuecxx . . $ oval_value# *value = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING., concat);
1639 freecxx . . $ free(5d22bdacc48458e8).(concat);
1640 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, value);
1641 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! rotate = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1642 if (passnum < catnum) {
1643 for (idx0 = 0; idx0 < len_subcomps && rotate; idx0++) {
1644 if (texts[idx0]) {
1645 if (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(values[idx0])) {
1646 rotate = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1647 } else {
1648 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(values[idx0]);
1649 values[idx0] =
1650 (struct oval_value_iteratorcxx . . $ oval_value_iterator# *)
1651 oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(component_colls[idx0]);
1652 }
1653 texts[idx0] =
1654 oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(values[idx0]));
1655 }
1656 }
1657 }
1658 }
1659 for (idx0 = 0; idx0 < len_subcomps; idx0++) {
1660 if (counts[idx0]) {
1661 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(values[idx0]);
1662 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(component_colls[idx0],
1663 (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
1664 }
1665 }
1666 freecxx . . $ free(5d22bdacc48458e8).(counts);
1667 freecxx . . $ free(5d22bdacc48458e8).(texts);
1668 freecxx . . $ free(5d22bdacc48458e8).(values);
1669 } else {
1670 for (idx0 = 0; idx0 < len_subcomps; ++idx0)
1671 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(component_colls[idx0], (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
1672 }
1673 freecxx . . $ free(5d22bdacc48458e8).(component_colls);
1674 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
1675 return flag;
1676 }
1677
1678 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_COUNTcxx . . $ _oval_component_evaluate_COUNT(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
1679 struct oval_componentcxx . . $ oval_component# *component,
1680 struct oval_collectioncxx . . $ oval_collection# *value_collection)
1681 {
1682 int count = 0;
1683 int idx0 = 0;
1684
1685 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.;
1686 struct oval_component_iteratorcxx . . $ oval_component_iterator# *subcomps = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(component);
1687 int len_subcomps = oval_component_iterator_remainingcxx . . $ oval_component_iterator_remaining(360b25b6bb1e1ca7).(subcomps);
1688 struct oval_collectioncxx . . $ oval_collection# **component_colls = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(len_subcomps * sizeof(struct oval_collectioncxx . . $ oval_collection# *));
1689 for (idx0 = 0; oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps); idx0++) {
1690 struct oval_collectioncxx . . $ oval_collection# *subcoll = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
1691 struct oval_componentcxx . . $ oval_component# *subcomp = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(subcomps);
1692 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# subflag = oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(argu, subcomp, subcoll);
1693 flag = _AGG_FLAGcxx . . $ `src/OVAL/oval_component.c:106:9`!(flag, subflag);
1694 component_colls[idx0] = subcoll;
1695 }
1696 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! not_finished = (len_subcomps > 0) && _HAS_VALUEScxx . . $ `src/OVAL/oval_component.c:1457:9`!(flag);
1697 if (not_finished) {
1698 for (idx0 = 0; idx0 < len_subcomps; idx0++) {
1699 struct oval_value_iteratorcxx . . $ oval_value_iterator# *comp_values =
1700 (struct oval_value_iteratorcxx . . $ oval_value_iterator# *)oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(component_colls[idx0]);
1701 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(comp_values)) {
1702 if (oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(comp_values)))
1703 count++;
1704 }
1705 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(comp_values);
1706
1707 }
1708 }
1709 char count_str[128];
1710 snprintfcxx . . $ snprintf(ea502d73e74c754c).(count_str, sizeof(count_str), "%d", count);
1711 struct oval_valuecxx . . $ oval_value# *value = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_INTEGERcxx . . $ OVAL_DATATYPE_INTEGER., count_str);
1712 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, value);
1713
1714 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
1715
1716 for (idx0 = 0; idx0 < len_subcomps; ++idx0)
1717 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(component_colls[idx0], (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
1718
1719 freecxx . . $ free(5d22bdacc48458e8).(component_colls);
1720 return flag;
1721 }
1722
1723 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_UNIQUEcxx . . $ _oval_component_evaluate_UNIQUE(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
1724 struct oval_componentcxx . . $ oval_component# *component,
1725 struct oval_collectioncxx . . $ oval_collection# *value_collection)
1726 {
1727 int idx0 = 0;
1728 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.;
1729 struct oval_component_iteratorcxx . . $ oval_component_iterator# *subcomps = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(component);
1730 int len_subcomps = oval_component_iterator_remainingcxx . . $ oval_component_iterator_remaining(360b25b6bb1e1ca7).(subcomps);
1731 struct oval_collectioncxx . . $ oval_collection# **component_colls = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(len_subcomps * sizeof(struct oval_collectioncxx . . $ oval_collection# *));
1732
1733 for (idx0 = 0; oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps); idx0++) {
1734 struct oval_collectioncxx . . $ oval_collection# *subcoll = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
1735 struct oval_componentcxx . . $ oval_component# *subcomp = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(subcomps);
1736 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# subflag = oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(argu, subcomp, subcoll);
1737 flag = _AGG_FLAGcxx . . $ `src/OVAL/oval_component.c:106:9`!(flag, subflag);
1738 component_colls[idx0] = subcoll;
1739 }
1740
1741 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
1742
1743 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! not_finished = (len_subcomps > 0) && _HAS_VALUEScxx . . $ `src/OVAL/oval_component.c:1457:9`!(flag);
1744 struct oval_string_mapcxx . . $ oval_string_map# *valmap = oval_string_map_newcxx . . $ oval_string_map_new(c786b134e882bd29).();
1745
1746 if (not_finished) {
1747 for (idx0 = 0; idx0 < len_subcomps; idx0++) {
1748 struct oval_value_iteratorcxx . . $ oval_value_iterator# *comp_values =
1749 (struct oval_value_iteratorcxx . . $ oval_value_iterator# *)oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(component_colls[idx0]);
1750
1751 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(comp_values)) {
1752 char *valtxt;
1753 if ((valtxt = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(comp_values))) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
1754 if (oval_string_map_get_valuecxx . . $ oval_string_map_get_value(c9e9819de236f3d5).(valmap, valtxt) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
1755 struct oval_valuecxx . . $ oval_value# *value = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING., valtxt);
1756 oval_string_map_putcxx . . $ oval_string_map_put(95b46de789826acc).(valmap, valtxt, value);
1757 }
1758 }
1759 }
1760 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(comp_values);
1761 }
1762 }
1763
1764 oval_string_map_collect_valuescxx . . $ oval_string_map_collect_values(5121c6e4df28049d).(valmap, value_collection);
1765 oval_string_map_freecxx . . $ oval_string_map_free(e4310474f4dc2f59).(valmap, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1766
1767 for (idx0 = 0; idx0 < len_subcomps; ++idx0)
1768 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(component_colls[idx0], (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
1769
1770 freecxx . . $ free(5d22bdacc48458e8).(component_colls);
1771 return flag;
1772 }
1773
1774 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_SPLITcxx . . $ _oval_component_evaluate_SPLIT(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
1775 struct oval_componentcxx . . $ oval_component# *component,
1776 struct oval_collectioncxx . . $ oval_collection# *value_collection)
1777 {
1778
1779 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.;
1780 struct oval_component_iteratorcxx . . $ oval_component_iterator# *subcomps = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(component);
1781 char *delimiter = oval_component_get_split_delimitercxx . . $ oval_component_get_split_delimiter(801bf966f21b1bfa).(component);
1782 int len_delim = strlencxx . . $ strlen(751346f8406fd082).(delimiter);
1783 if (oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps)) { /* Only first component is considered */
1784 struct oval_componentcxx . . $ oval_component# *subcomp = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(subcomps);
1785 struct oval_collectioncxx . . $ oval_collection# *subcoll = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
1786 flag = oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(argu, subcomp, subcoll);
1787 struct oval_value_iteratorcxx . . $ oval_value_iterator# *values = (struct oval_value_iteratorcxx . . $ oval_value_iterator# *)oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(subcoll);
1788 struct oval_valuecxx . . $ oval_value# *value;
1789 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(values)) {
1790 char *text = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(values));
1791 if (len_delim) {
1792 char *split = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(strlencxx . . $ strlen(751346f8406fd082).(text) + 2);
1793 char *split0 = split;
1794 *split0 = '\0';
1795 strcatcxx . . $ strcat(b7b3a83273496486).(split0, text);
1796 split0[strlencxx . . $ strlen(751346f8406fd082).(text) + 1] = '\0'; /*last two characters are EOS */
1797 char *split1;
1798 for (split1 = strstrcxx . . $ strstr(a713fe7b9a57cf96).(split0, delimiter); split1; split1 = strstrcxx . . $ strstr(a713fe7b9a57cf96).(split0, delimiter)) {
1799 *split1 = '\0'; /*terminate the text at the delimeter */
1800 value = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING., split0);
1801 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, value);
1802 split0 = split1 + len_delim; /*advance split1 */
1803 }
1804 value = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING., split0);
1805 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, value);
1806 freecxx . . $ free(5d22bdacc48458e8).(split);
1807 } else { /*Empty delimiter, Split at every character */
1808 char split[] = { '\0', '\0' };
1809 int idx;
1810 for (idx = 0; text[idx]; idx++) {
1811 *split = text[idx];
1812 value = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING., split);
1813 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, value);
1814 }
1815 }
1816 }
1817 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(values);
1818 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(subcoll, (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
1819 }
1820 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
1821 return flag;
1822 };
1823
1824 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_SUBSTRINGcxx . . $ _oval_component_evaluate_SUBSTRING(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
1825 struct oval_componentcxx . . $ oval_component# *component,
1826 struct oval_collectioncxx . . $ oval_collection# *value_collection)
1827 {
1828 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.;
1829 struct oval_component_iteratorcxx . . $ oval_component_iterator# *subcomps = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(component);
1830 ssize_tcxx . . $ ssize_t# beg = oval_component_get_substring_startcxx . . $ oval_component_get_substring_start(5e31221d32e7dfb3).(component);
1831 ssize_tcxx . . $ ssize_t# len = oval_component_get_substring_lengthcxx . . $ oval_component_get_substring_length(5e31221d32e7dfb3).(component);
1832
1833 beg = (beg < 1) ? 0 : beg - 1;
1834
1835 if (oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps)) { /*Only first component is considered */
1836 struct oval_componentcxx . . $ oval_component# *subcomp = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(subcomps);
1837 struct oval_collectioncxx . . $ oval_collection# *subcoll = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
1838 flag = oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(argu, subcomp, subcoll);
1839 struct oval_value_iteratorcxx . . $ oval_value_iterator# *values = (struct oval_value_iteratorcxx . . $ oval_value_iterator# *)oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(subcoll);
1840 struct oval_valuecxx . . $ oval_value# *value;
1841
1842 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(values)) {
1843 char *text = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(values));
1844 size_t txtlen, sublen;
1845
1846 txtlen = strlencxx . . $ strlen(751346f8406fd082).(text);
1847 sublen = (len < 0 || (size_t) len > txtlen) ? txtlen : (size_t) len;
1848 if ((size_t) beg < txtlen) {
1849 char *substr = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sublen + 1);
1850
1851 strncpycxx . . $ strncpy(255158a415b673b0).(substr, text + beg, sublen);
1852 substr[sublen] = '\0';
1853
1854 value = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING., substr);
1855 freecxx . . $ free(5d22bdacc48458e8).(substr);
1856 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, value);
1857 } else {
1858 flag = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
1859 }
1860 }
1861 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(values);
1862 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(subcoll, (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
1863 }
1864 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
1865 return flag;
1866 }
1867
1868 static long unsigned int _comp_seccxx . . $ _comp_sec(a39f26772068b22e).(int year, int month, int day, int hour, int minute, int second)
1869 {
1870 time_tcxx . . $ time_t# t;
1871 struct tmcxx . . $ tm# *ts;
1872 struct tmcxx . . $ tm# result;
1873
1874 t = timecxx . . $ time(7f38134db6521d23).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1875 ts = localtime_rcxx . . $ localtime_r(92e3d173686db852).(&t, &result);
1876
1877 ts->tm_yearcxx . . $ tm#tm_year. = year - 1900;
1878 ts->tm_moncxx . . $ tm#tm_mon. = month - 1;
1879 ts->tm_mdaycxx . . $ tm#tm_mday. = day;
1880 ts->tm_hourcxx . . $ tm#tm_hour. = hour;
1881 ts->tm_mincxx . . $ tm#tm_min. = minute;
1882 ts->tm_seccxx . . $ tm#tm_sec. = second;
1883 ts->tm_isdstcxx . . $ tm#tm_isdst. = -1;
1884 t = mktimecxx . . $ mktime(237c3516b2cfac2c).(ts);
1885 ts = localtime_rcxx . . $ localtime_r(92e3d173686db852).(&t, &result);
1886
1887 if (ts->tm_isdstcxx . . $ tm#tm_isdst. == 1)
1888 t -= 3600;
1889
1890 return (long unsigned int) t;
1891 }
1892
1893 /*
1894 * year_month_day
1895 * The year_month_day value specifies date-time strings that follow the formats:
1896 *
1897 * strptime(3)
1898 */
1899 static const char *_dtfmt_ymdcxx . . $ _dtfmt_ymd.[] = {
1900 "%Y%m%d", /* yyyymmdd */
1901 "%Y/%m/%d", /* yyyy/mm/dd */
1902 "%Y-%m-%d", /* yyyy-mm-dd */
1903 "%Y%m%dT%H%M%S", /* yyyymmddThhmmss */
1904 "%Y/%m/%d%n%T", /* yyyy/mm/dd hh:mm:ss */
1905 "%Y-%m-%d%n%T" /* yyyy-mm-dd hh:mm:ss */
1906 };
1907
1908 /*
1909 * month_day_year
1910 * The month_day_year value specifies date-time strings that follow the formats:
1911 *
1912 * strptime(3)
1913 */
1914 static const char *_dtfmt_mdycxx . . $ _dtfmt_mdy.[] = {
1915 "%m/%d/%Y", /* mm/dd/yyyy */
1916 "%m-%d-%Y", /* mm-dd-yyyy */
1917 "%b,%n%d%n%Y", /* AbreviatedNameOfMonth, dd yyyy */
1918 "%m/%d/%Y%n%T", /* mm/dd/yyyy hh:mm:ss */
1919 "%m-%d-%Y%n%T", /* mm-dd-yyyy hh:mm:ss */
1920 "%b,%n%d%n%Y%n%T" /* NameOfMonth, dd yyyy hh:mm:ss & AbreviatedNameOfMonth, dd yyyy hh:mm:ss */
1921 };
1922
1923 /*
1924 * day_month_year
1925 * The day_month_year value specifies date-time strings that follow the formats:
1926 *
1927 * strptime(3)
1928 */
1929 static const char *_dtfmt_dmycxx . . $ _dtfmt_dmy.[] = {
1930 "%d/%m/%Y", /* dd/mm/yyyy */
1931 "%d-%m-%Y", /* dd-mm-yyyy */
1932 "%d/%m/%Y%n%T", /* dd/mm/yyyy hh:mm:ss */
1933 "%d-%m-%Y%n%T" /* dd-mm-yyyy hh:mm:ss */
1934 };
1935
1936 static long unsigned int _parse_datetimecxx . . $ _parse_datetime(9ca97bdd31671015).(char *datetime, const char *fmt[], size_t fmtcnt)
1937 {
1938 struct tmcxx . . $ tm# t;
1939 size_t i;
1940 char *r;
1941
1942 dDcxx . . $ `src/common/debug_priv.h:64:9`!("Parsing datetime string \"%s\"", datetime);
1943
1944 for (i = 0; i < fmtcnt; ++i) {
1945 dDcxx . . $ `src/common/debug_priv.h:64:9`!("%s", fmt[i]);
1946 memsetcxx . . $ memset(d1de1e4fb215f1c6).(&t, 0, sizeof t);
1947 r = strptimecxx . . $ strptime(1a7ef247aca60a9e).(datetime, fmt[i], &t);
1948
1949 if (r != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
1950 if (*r == '\0') {
1951 dDcxx . . $ `src/common/debug_priv.h:64:9`!("Success!");
1952 return _comp_seccxx . . $ _comp_sec(a39f26772068b22e).(t.tm_yearcxx . . $ tm#tm_year., t.tm_moncxx . . $ tm#tm_mon., t.tm_mdaycxx . . $ tm#tm_mday.,
1953 t.tm_hourcxx . . $ tm#tm_hour., t.tm_mincxx . . $ tm#tm_min., t.tm_seccxx . . $ tm#tm_sec.);
1954 }
1955 }
1956 }
1957
1958 dEcxx . . $ `src/common/debug_priv.h:63:9`!("Unable to interpret \"%s\" as a datetime string", datetime);
1959
1960 return (0);
1961 }
1962
1963 static long unsigned int _parse_fmt_wincxx . . $ _parse_fmt_win(eaf2deab88802fce).(char *dt)
1964 {
1965 // todo
1966 return 0;
1967 }
1968
1969 static long unsigned int _parse_fmt_ssecxx . . $ _parse_fmt_sse(eaf2deab88802fce).(char *dt)
1970 {
1971 time_tcxx . . $ time_t# t;
1972 struct tmcxx . . $ tm# *ts;
1973 struct tmcxx . . $ tm# result;
1974
1975 t = (time_tcxx . . $ time_t#) atolcxx . . $ atol(3c95bd14d5d5d286).(dt);
1976 ts = localtime_rcxx . . $ localtime_r(92e3d173686db852).(&t, &result);
1977 if (ts->tm_isdstcxx . . $ tm#tm_isdst. == 1)
1978 t -= 3600;
1979
1980 return (long unsigned int) t;
1981 }
1982
1983 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! _matchcxx . . $ _match(b7a7aa4a824b7595).(const char *pattern, const char *string)
1984 {
1985 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! match = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1986 oscap_pcre_tcxx . . $ oscap_pcre_t# *re;
1987 char *error;
1988 int erroffset = -1, ovector[60], ovector_len = sizeof (ovector) / sizeof (ovector[0]);
1989 re = oscap_pcre_compilecxx . . $ oscap_pcre_compile(29ca11f2d36a957a).(pattern, OSCAP_PCRE_OPTS_UTF8cxx . . $ OSCAP_PCRE_OPTS_UTF8., &error, &erroffset);
1990 if (re == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
1991 oscap_pcre_err_freecxx . . $ oscap_pcre_err_free(fda57c8427c60377).(error);
1992 return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1993 }
1994 match = (oscap_pcre_execcxx . . $ oscap_pcre_exec(7630dfd25fd504ec).(re, string, strlencxx . . $ strlen(751346f8406fd082).(string), 0, 0, ovector, ovector_len) >= 0);
1995 oscap_pcre_freecxx . . $ oscap_pcre_free(804bb72472b0846e).(re);
1996 return match;
1997 }
1998
1999 static long unsigned int _parse_fmt_cimcxx . . $ _parse_fmt_cim(eaf2deab88802fce).(char *dt)
2000 {
2001 const char *pattern1 = "^[0-9]{14}\\.[0-9]{6}[+-][0-9]{3}$"; // yyyymmddHHMMSS.mmmmmmsUUU
2002 const char *fmt_str1 = "%4u%2u%2u%2u%2u%2u.%*6u%*[+-]%*3u";
2003 const char *pattern2 = "^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}:[0-9]{3}$"; // yyyy-mm-dd HH:MM:SS:mmm
2004 const char *fmt_str2 = "%4d-%2d-%2d %2d:%2d:%2d:%*3d";
2005 const char *pattern3 = "^[0-9]{2}-[0-9]{2}-[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}:[0-9]{3}$"; // mm-dd-yyyy hh:mm:ss:mmm
2006 const char *fmt_str3 = "%2d-%2d-%4d %2d:%2d:%2d:%*3d";
2007 int year, month, day, hour, minute, second, r = 0;
2008 const int number_of_items = 6;
2009 if (_matchcxx . . $ _match(b7a7aa4a824b7595).(pattern1, dt)) {
2010 r = sscanfcxx . . $ sscanf(5e8a2c12db2ea735).(dt, fmt_str1, &year, &month, &day, &hour, &minute, &second);
2011 } else if (_matchcxx . . $ _match(b7a7aa4a824b7595).(pattern2, dt)) {
2012 r = sscanfcxx . . $ sscanf(5e8a2c12db2ea735).(dt, fmt_str2, &year, &month, &day, &hour, &minute, &second);
2013 } else if (_matchcxx . . $ _match(b7a7aa4a824b7595).(pattern3, dt)) {
2014 r = sscanfcxx . . $ sscanf(5e8a2c12db2ea735).(dt, fmt_str3, &month, &day, &year, &hour, &minute, &second);
2015 }
2016 if (r != number_of_items) {
2017 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, "Unable to interpret \"%s\" as a cim_datetime string\n", dt);
2018 return 0;
2019 }
2020 return _comp_seccxx . . $ _comp_sec(a39f26772068b22e).(year, month, day, hour, minute, second);
2021 }
2022
2023 static long unsigned int _parse_fmtcxx . . $ _parse_fmt(57a4e28610a29603).(struct oval_valuecxx . . $ oval_value# *val, oval_datetime_format_tcxx . . $ oval_datetime_format_t# fmt)
2024 {
2025 long unsigned int v = 0;
2026 char *sv;
2027
2028 sv = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(val);
2029
2030 switch (fmt) {
2031 case OVAL_DATETIME_YEAR_MONTH_DAYcxx . . $ OVAL_DATETIME_YEAR_MONTH_DAY.:
2032 v = _parse_datetimecxx . . $ _parse_datetime(9ca97bdd31671015).(sv, _dtfmt_ymdcxx . . $ _dtfmt_ymd., sizeof _dtfmt_ymdcxx . . $ _dtfmt_ymd./sizeof(char *));
2033 break;
2034 case OVAL_DATETIME_MONTH_DAY_YEARcxx . . $ OVAL_DATETIME_MONTH_DAY_YEAR.:
2035 v = _parse_datetimecxx . . $ _parse_datetime(9ca97bdd31671015).(sv, _dtfmt_mdycxx . . $ _dtfmt_mdy., sizeof _dtfmt_mdycxx . . $ _dtfmt_mdy./sizeof(char *));
2036 break;
2037 case OVAL_DATETIME_DAY_MONTH_YEARcxx . . $ OVAL_DATETIME_DAY_MONTH_YEAR.:
2038 v = _parse_datetimecxx . . $ _parse_datetime(9ca97bdd31671015).(sv, _dtfmt_dmycxx . . $ _dtfmt_dmy., sizeof _dtfmt_dmycxx . . $ _dtfmt_dmy./sizeof(char *));
2039 break;
2040 case OVAL_DATETIME_WIN_FILETIMEcxx . . $ OVAL_DATETIME_WIN_FILETIME.:
2041 v = _parse_fmt_wincxx . . $ _parse_fmt_win(eaf2deab88802fce).(sv);
2042 break;
2043 case OVAL_DATETIME_SECONDS_SINCE_EPOCHcxx . . $ OVAL_DATETIME_SECONDS_SINCE_EPOCH.:
2044 v = _parse_fmt_ssecxx . . $ _parse_fmt_sse(eaf2deab88802fce).(sv);
2045 break;
2046 case OVAL_DATETIME_CIM_DATETIMEcxx . . $ OVAL_DATETIME_CIM_DATETIME.:
2047 v = _parse_fmt_cimcxx . . $ _parse_fmt_cim(eaf2deab88802fce).(sv);
2048 break;
2049 default:
2050 break;
2051 }
2052
2053 return v;
2054 }
2055
2056 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_TIMEDIFcxx . . $ _oval_component_evaluate_TIMEDIF(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
2057 struct oval_componentcxx . . $ oval_component# *component,
2058 struct oval_collectioncxx . . $ oval_collection# *value_collection)
2059 {
2060 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.;
2061 struct oval_component_iteratorcxx . . $ oval_component_iterator# *subcomps;
2062 int subcomp_idx;
2063 struct oval_collectioncxx . . $ oval_collection# *val_cols[2];
2064 struct oval_value_iteratorcxx . . $ oval_value_iterator# *v1_itr;
2065 oval_datetime_format_tcxx . . $ oval_datetime_format_t# fmt1, fmt2;
2066
2067 subcomps = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(component);
2068 subcomp_idx = 0;
2069 while (oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps) && subcomp_idx < 2) {
2070 struct oval_componentcxx . . $ oval_component# *subcomp;
2071
2072 subcomp = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(subcomps);
2073 val_cols[subcomp_idx] = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
2074 flag = oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(argu, subcomp, val_cols[subcomp_idx]);
2075 subcomp_idx++;
2076 }
2077
2078 if (oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps)) {
2079 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
2080 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(val_cols[0], (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
2081 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(val_cols[1], (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
2082 return SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
2083 }
2084 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
2085 if (subcomp_idx == 0) {
2086 return SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
2087 }
2088
2089 fmt1 = oval_component_get_timedif_format_1cxx . . $ oval_component_get_timedif_format_1(723469270ffc4aa3).(component);
2090 fmt2 = oval_component_get_timedif_format_2cxx . . $ oval_component_get_timedif_format_2(723469270ffc4aa3).(component);
2091
2092 if (subcomp_idx == 1) {
2093 struct oval_valuecxx . . $ oval_value# *ov;
2094 char ts[16];
2095
2096 val_cols[1] = val_cols[0];
2097 val_cols[0] = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
2098 snprintfcxx . . $ snprintf(ea502d73e74c754c).(ts, sizeof (ts), "%lu", (long unsigned int) timecxx . . $ time(7f38134db6521d23).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!));
2099 ov = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_INTEGERcxx . . $ OVAL_DATATYPE_INTEGER., ts);
2100 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(val_cols[0], ov);
2101 fmt1 = OVAL_DATETIME_SECONDS_SINCE_EPOCHcxx . . $ OVAL_DATETIME_SECONDS_SINCE_EPOCH.;
2102 }
2103
2104 v1_itr = (struct oval_value_iteratorcxx . . $ oval_value_iterator# *) oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(val_cols[0]);
2105 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(v1_itr)) {
2106 struct oval_valuecxx . . $ oval_value# *ov1;
2107 struct oval_value_iteratorcxx . . $ oval_value_iterator# *v2_itr;
2108
2109 ov1 = oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(v1_itr);
2110
2111 v2_itr = (struct oval_value_iteratorcxx . . $ oval_value_iterator# *) oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(val_cols[1]);
2112 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(v2_itr)) {
2113 long unsigned int v;
2114 char ts[16];
2115 struct oval_valuecxx . . $ oval_value# *ov2, *ov;
2116
2117 ov2 = oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(v2_itr);
2118 v = _parse_fmtcxx . . $ _parse_fmt(57a4e28610a29603).(ov1, fmt1) - _parse_fmtcxx . . $ _parse_fmt(57a4e28610a29603).(ov2, fmt2);
2119 snprintfcxx . . $ snprintf(ea502d73e74c754c).(ts, sizeof (ts), "%lu", v);
2120 ov = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_INTEGERcxx . . $ OVAL_DATATYPE_INTEGER., ts);
2121 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, ov);
2122 }
2123 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(v2_itr);
2124 }
2125 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(v1_itr);
2126
2127 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(val_cols[0], (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
2128 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(val_cols[1], (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
2129
2130 return flag;
2131 }
2132
2133 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! _isEscapecxx . . $ _isEscape(b5fd09639b7a0261).(char chr)
2134 {
2135 const char *regex_chars = "^$\\.[](){}*+?|";
2136
2137 return (strchrcxx . . $ strchr(2050848944e00d54).(regex_chars, chr) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) ? falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`! : truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2138 }
2139
2140 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_ESCAPE_REGEXcxx . . $ _oval_component_evaluate_ESCAPE_REGEX(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
2141 struct oval_componentcxx . . $ oval_component# *component,
2142 struct oval_collectioncxx . . $ oval_collection# *value_collection)
2143 {
2144 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.;
2145 struct oval_component_iteratorcxx . . $ oval_component_iterator# *subcomps = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(component);
2146
2147 if (oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps)) { //Only first component is considered
2148 struct oval_componentcxx . . $ oval_component# *subcomp = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(subcomps);
2149 struct oval_collectioncxx . . $ oval_collection# *subcoll = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
2150 flag = oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(argu, subcomp, subcoll);
2151 struct oval_value_iteratorcxx . . $ oval_value_iterator# *values = (struct oval_value_iteratorcxx . . $ oval_value_iterator# *)oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(subcoll);
2152 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(values)) {
2153 struct oval_valuecxx . . $ oval_value# *value = oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(values);
2154 char *text = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(value);
2155 int len = strlencxx . . $ strlen(751346f8406fd082).(text);
2156 char *string = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(2 * len + 1);
2157 char *insert = string;
2158 while (*text) {
2159 if (_isEscapecxx . . $ _isEscape(b5fd09639b7a0261).(*text))
2160 *insert++ = '\\';
2161 *insert++ = *text++;
2162 }
2163 *insert = '\0';
2164 value = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING., string);
2165 freecxx . . $ free(5d22bdacc48458e8).(string);
2166 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, value);
2167 }
2168 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(values);
2169 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(subcoll, (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
2170 }
2171 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
2172 return flag;
2173 }
2174
2175
2176
2177
2178
2179 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_GLOB_TO_REGEXcxx . . $ _oval_component_evaluate_GLOB_TO_REGEX(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
2180 struct oval_componentcxx . . $ oval_component# *component,
2181 struct oval_collectioncxx . . $ oval_collection# *value_collection)
2182 {
2183 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.;
2184 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! glob_noescape = oval_component_get_glob_to_regex_glob_noescapecxx . . $ oval_component_get_glob_to_regex_glob_noescape(a3cfe8b68df8b786).(component);
2185 struct oval_component_iteratorcxx . . $ oval_component_iterator# *subcomps = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(component);
2186 if (oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps)) { //Only first component is considered
2187 struct oval_componentcxx . . $ oval_component# *subcomp = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(subcomps);
2188 struct oval_collectioncxx . . $ oval_collection# *subcoll = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
2189 flag = oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(argu, subcomp, subcoll);
2190 struct oval_value_iteratorcxx . . $ oval_value_iterator# *values = (struct oval_value_iteratorcxx . . $ oval_value_iterator# *)oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(subcoll);
2191 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(values)) {
2192 struct oval_valuecxx . . $ oval_value# *value = oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(values);
2193 char *text = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(value);
2194 char *string = oval_glob_to_regexcxx . . $ oval_glob_to_regex(2050848944e00d54).(text, glob_noescape);
2195 if (string == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
2196 flag = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
2197 break;
2198 }
2199 value = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING., string);
2200 freecxx . . $ free(5d22bdacc48458e8).(string);
2201 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, value);
2202 }
2203 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(values);
2204 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(subcoll, (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
2205 }
2206 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
2207 return flag;
2208 }
2209
2210 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_REGEX_CAPTUREcxx . . $ _oval_component_evaluate_REGEX_CAPTURE(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
2211 struct oval_componentcxx . . $ oval_component# *component,
2212 struct oval_collectioncxx . . $ oval_collection# *value_collection)
2213 {
2214 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.;
2215 int rc;
2216 char *pattern;
2217 int erroffset = -1;
2218 oscap_pcre_tcxx . . $ oscap_pcre_t# *re = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2219 char *error;
2220
2221 pattern = oval_component_get_regex_patterncxx . . $ oval_component_get_regex_pattern(801bf966f21b1bfa).(component);
2222 re = oscap_pcre_compilecxx . . $ oscap_pcre_compile(29ca11f2d36a957a).(pattern, OSCAP_PCRE_OPTS_UTF8cxx . . $ OSCAP_PCRE_OPTS_UTF8., &error, &erroffset);
2223 if (re == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
2224 dEcxx . . $ `src/common/debug_priv.h:63:9`!("oscap_pcre_compile() failed: \"%s\".", error);
2225 oscap_pcre_err_freecxx . . $ oscap_pcre_err_free(fda57c8427c60377).(error);
2226 return SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
2227 }
2228
2229 struct oval_component_iteratorcxx . . $ oval_component_iterator# *subcomps = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(component);
2230 if (oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps)) { //Only first component is considered
2231 struct oval_componentcxx . . $ oval_component# *subcomp = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(subcomps);
2232 struct oval_collectioncxx . . $ oval_collection# *subcoll = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
2233 flag = oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(argu, subcomp, subcoll);
2234 struct oval_value_iteratorcxx . . $ oval_value_iterator# *values = (struct oval_value_iteratorcxx . . $ oval_value_iterator# *)oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(subcoll);
2235 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(values)) {
2236 struct oval_valuecxx . . $ oval_value# *value = oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(values);
2237 char *text = oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(value);
2238 char *nval = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2239 int i, ovector[60], ovector_len = sizeof (ovector) / sizeof (ovector[0]);
2240
2241 for (i = 0; i < ovector_len; ++i)
2242 ovector[i] = -1;
2243
2244 rc = oscap_pcre_execcxx . . $ oscap_pcre_exec(7630dfd25fd504ec).(re, text, strlencxx . . $ strlen(751346f8406fd082).(text), 0, 0, ovector, ovector_len);
2245 if (rc < -1) {
2246 dEcxx . . $ `src/common/debug_priv.h:63:9`!("oscap_pcre_exec() failed: %d.", rc);
2247 flag = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
2248 break;
2249 }
2250
2251 if (rc > 1 && ovector[2] != -1) {
2252 int substr_len = ovector[3] - ovector[2];
2253
2254 nval = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(substr_len + 1);
2255 memcpycxx . . $ memcpy(cc817cb175f282d).(nval, text + ovector[2], substr_len);
2256 nval[substr_len] = '\0';
2257 } else {
2258 nval = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2259 }
2260 flag = SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.;
2261
2262 if (nval != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
2263 value = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING., nval);
2264 freecxx . . $ free(5d22bdacc48458e8).(nval);
2265 } else {
2266 value = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING., "");
2267 }
2268 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(value_collection, value);
2269 }
2270 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(values);
2271 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(subcoll, (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
2272 }
2273 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
2274 oscap_pcre_freecxx . . $ oscap_pcre_free(804bb72472b0846e).(re);
2275 return flag;
2276 }
2277
2278 struct val_col_lst_scxx . . $ val_col_lst_s# {
2279 void *val_colcxx . . $ val_col_lst_s#val_col.;
2280 struct val_col_lst_scxx . . $ val_col_lst_s# *nextcxx . . $ val_col_lst_s#next.;
2281 };
2282
2283 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_ARITHMETIC_reccxx . . $ _oval_component_evaluate_ARITHMETIC_rec(d78d8ede37440e23).(struct val_col_lst_scxx . . $ val_col_lst_s# *val_col_lst, double val,
2284 oval_datatype_tcxx . . $ oval_datatype_t# datatype, oval_arithmetic_operation_tcxx . . $ oval_arithmetic_operation_t# op,
2285 struct oval_collectioncxx . . $ oval_collection# *res_val_col)
2286 {
2287 struct oval_value_iteratorcxx . . $ oval_value_iterator# *val_itr;
2288
2289 if (val_col_lst == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
2290 struct oval_valuecxx . . $ oval_value# *ov;
2291 char sv[32];
2292
2293 memsetcxx . . $ memset(d1de1e4fb215f1c6).(sv, 0, sizeof (sv));
2294
2295 if (datatype == OVAL_DATATYPE_INTEGERcxx . . $ OVAL_DATATYPE_INTEGER.) {
2296 snprintfcxx . . $ snprintf(ea502d73e74c754c).(sv, sizeof (sv), "%ld", (long int) val);
2297 } else if (datatype == OVAL_DATATYPE_FLOATcxx . . $ OVAL_DATATYPE_FLOAT.) {
2298 snprintfcxx . . $ snprintf(ea502d73e74c754c).(sv, sizeof (sv), "%f", val);
2299 }
2300 ov = oval_value_newcxx . . $ oval_value_new(c58b1d972ef552d6).(datatype, sv);
2301 oval_collection_addcxx . . $ oval_collection_add(3c6bf54730c0284).(res_val_col, ov);
2302
2303 return SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.;
2304 }
2305
2306 val_itr = (struct oval_value_iteratorcxx . . $ oval_value_iterator# *) oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(val_col_lst->val_colcxx . . $ val_col_lst_s#val_col.);
2307 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(val_itr)) {
2308 struct oval_valuecxx . . $ oval_value# *ov;
2309 oval_datatype_tcxx . . $ oval_datatype_t# dt;
2310 double new_val;
2311
2312 ov = oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(val_itr);
2313 dt = oval_value_get_datatypecxx . . $ oval_value_get_datatype(9f2201a27f3b3b4).(ov);
2314 if (dt == OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING.) {
2315 errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = 0; // Setting errno to 0 as suggested by strtod() manpage, as 0 is used both on success and failure
2316 new_val = strtodcxx . . $ strtod(3dfe5620a0d3160e).(oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(ov), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
2317 if (errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!) {
2318 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!, "Unexpected content: %s.", oval_value_get_text(ov));
2319 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(val_itr);
2320 return SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
2321 }
2322 } else if (dt == OVAL_DATATYPE_INTEGERcxx . . $ OVAL_DATATYPE_INTEGER.) {
2323 new_val = (double) oval_value_get_integercxx . . $ oval_value_get_integer(342b6ffec2724d54).(ov);
2324 } else if (dt == OVAL_DATATYPE_FLOATcxx . . $ OVAL_DATATYPE_FLOAT.) {
2325 new_val = (double) oval_value_get_floatcxx . . $ oval_value_get_float(65ea1e3a8a2f306c).(ov);
2326 } else {
2327 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!, "Unexpected value type: %s.", oval_datatype_get_text(dt));
2328 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(val_itr);
2329 return SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
2330 }
2331
2332 if (op == OVAL_ARITHMETIC_ADDcxx . . $ OVAL_ARITHMETIC_ADD.) {
2333 new_val += val;
2334 } else if (op == OVAL_ARITHMETIC_MULTIPLYcxx . . $ OVAL_ARITHMETIC_MULTIPLY.) {
2335 new_val *= val;
2336 } else {
2337 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!, "Unexpected arithmetic operation: %s.", oval_arithmetic_operation_get_text(op));
2338 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(val_itr);
2339 return SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
2340 }
2341
2342 if (datatype == OVAL_DATATYPE_FLOATcxx . . $ OVAL_DATATYPE_FLOAT.)
2343 dt = OVAL_DATATYPE_FLOATcxx . . $ OVAL_DATATYPE_FLOAT.;
2344 _oval_component_evaluate_ARITHMETIC_reccxx . . $ _oval_component_evaluate_ARITHMETIC_rec(d78d8ede37440e23).(val_col_lst->nextcxx . . $ val_col_lst_s#next., new_val, dt, op, res_val_col);
2345 }
2346 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(val_itr);
2347
2348 return SYSCHAR_FLAG_COMPLETEcxx . . $ SYSCHAR_FLAG_COMPLETE.;
2349 }
2350
2351 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# _oval_component_evaluate_ARITHMETICcxx . . $ _oval_component_evaluate_ARITHMETIC(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
2352 struct oval_componentcxx . . $ oval_component# *component,
2353 struct oval_collectioncxx . . $ oval_collection# *value_collection)
2354 {
2355 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_UNKNOWNcxx . . $ SYSCHAR_FLAG_UNKNOWN.;
2356 struct oval_component_iteratorcxx . . $ oval_component_iterator# *subcomps;
2357 struct val_col_lst_scxx . . $ val_col_lst_s# *vcl_root, *vcl_elm;
2358 oval_arithmetic_operation_tcxx . . $ oval_arithmetic_operation_t# op;
2359 struct oval_value_iteratorcxx . . $ oval_value_iterator# *val_itr;
2360
2361 op = oval_component_get_arithmetic_operationcxx . . $ oval_component_get_arithmetic_operation(ba8405f156bed481).(component);
2362 if (op != OVAL_ARITHMETIC_ADDcxx . . $ OVAL_ARITHMETIC_ADD. && op != OVAL_ARITHMETIC_MULTIPLYcxx . . $ OVAL_ARITHMETIC_MULTIPLY.) {
2363 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!, "Unexpected arithmetic operation: %s.", oval_arithmetic_operation_get_text(op));
2364 return SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
2365 }
2366
2367 vcl_root = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2368 subcomps = oval_component_get_function_componentscxx . . $ oval_component_get_function_components(94c3ef844dfbf230).(component);
2369 while (oval_component_iterator_has_morecxx . . $ oval_component_iterator_has_more(4cb12f2f157cd363).(subcomps)) {
2370 struct oval_componentcxx . . $ oval_component# *subcomp;
2371 struct oval_collectioncxx . . $ oval_collection# *val_col;
2372
2373 subcomp = oval_component_iterator_nextcxx . . $ oval_component_iterator_next(dabedb0449c97cd0).(subcomps);
2374 val_col = oval_collection_newcxx . . $ oval_collection_new(18476da3f812812d).();
2375 // todo: combine flags
2376 flag = oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(argu, subcomp, val_col);
2377 vcl_elm = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof (struct val_col_lst_scxx . . $ val_col_lst_s#));
2378 vcl_elm->val_colcxx . . $ val_col_lst_s#val_col. = val_col;
2379 vcl_elm->nextcxx . . $ val_col_lst_s#next. = vcl_root;
2380 vcl_root = vcl_elm;
2381 }
2382 oval_component_iterator_freecxx . . $ oval_component_iterator_free(2dbc3ee3ecde7d8d).(subcomps);
2383
2384 if (vcl_root == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
2385 return SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
2386 }
2387 val_itr = (struct oval_value_iteratorcxx . . $ oval_value_iterator# *) oval_collection_iteratorcxx . . $ oval_collection_iterator(8bdeb6a25e21af3e).(vcl_root->val_colcxx . . $ val_col_lst_s#val_col.);
2388 while (oval_value_iterator_has_morecxx . . $ oval_value_iterator_has_more(753adc45e63e3dec).(val_itr)) {
2389 struct oval_valuecxx . . $ oval_value# *ov;
2390 oval_datatype_tcxx . . $ oval_datatype_t# datatype;
2391 double val;
2392
2393 ov = oval_value_iterator_nextcxx . . $ oval_value_iterator_next(c6f435863c40c2c6).(val_itr);
2394 datatype = oval_value_get_datatypecxx . . $ oval_value_get_datatype(9f2201a27f3b3b4).(ov);
2395 if (datatype == OVAL_DATATYPE_STRINGcxx . . $ OVAL_DATATYPE_STRING.) {
2396 errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`! = 0; // Setting errno to 0 as suggested by strtod() manpage, as 0 is used both on success and failure
2397 val = strtodcxx . . $ strtod(3dfe5620a0d3160e).(oval_value_get_textcxx . . $ oval_value_get_text(cab4e37bbd1656d5).(ov), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
2398 if (errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!) {
2399 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!, "Unexpected content: %s.", oval_value_get_text(ov));
2400 flag = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
2401 goto cleanup;
2402 }
2403 } else if (datatype == OVAL_DATATYPE_INTEGERcxx . . $ OVAL_DATATYPE_INTEGER.) {
2404 val = (double) oval_value_get_integercxx . . $ oval_value_get_integer(342b6ffec2724d54).(ov);
2405 } else if (datatype == OVAL_DATATYPE_FLOATcxx . . $ OVAL_DATATYPE_FLOAT.) {
2406 val = (double) oval_value_get_floatcxx . . $ oval_value_get_float(65ea1e3a8a2f306c).(ov);
2407 } else {
2408 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!, "Unexpected value type: %s.", oval_datatype_get_text(datatype));
2409 flag = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
2410 goto cleanup;
2411 }
2412
2413 flag = _oval_component_evaluate_ARITHMETIC_reccxx . . $ _oval_component_evaluate_ARITHMETIC_rec(d78d8ede37440e23).(vcl_root->nextcxx . . $ val_col_lst_s#next., val, datatype, op, value_collection);
2414 }
2415
2416 cleanup:
2417 oval_value_iterator_freecxx . . $ oval_value_iterator_free(1b9ed96dce1b7286).(val_itr);
2418 while (vcl_root != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) {
2419 oval_collection_free_itemscxx . . $ oval_collection_free_items(637ec69504f927f1).(vcl_root->val_colcxx . . $ val_col_lst_s#val_col., (oscap_destruct_funccxx . . $ oscap_destruct_func#) oval_value_freecxx . . $ oval_value_free(d25d962808f14280).);
2420 vcl_elm = vcl_root;
2421 vcl_root = vcl_root->nextcxx . . $ val_col_lst_s#next.;
2422 freecxx . . $ free(5d22bdacc48458e8).(vcl_elm);
2423 }
2424
2425 return flag;
2426 }
2427
2428 typedef oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t#(_oval_component_evaluatorcxx . . $ _oval_component_evaluator#)
2429 (oval_argu_tcxx . . $ oval_argu_t# *, struct oval_componentcxx . . $ oval_component# *, struct oval_collectioncxx . . $ oval_collection# *);
2430
2431 static _oval_component_evaluatorcxx . . $ _oval_component_evaluator# *_component_evaluatorscxx . . $ _component_evaluators.[] = {
2432 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
2433 _oval_component_evaluate_LITERALcxx . . $ _oval_component_evaluate_LITERAL(4976d116c001d676).,
2434 _oval_component_evaluate_OBJECTREFcxx . . $ _oval_component_evaluate_OBJECTREF(4976d116c001d676).,
2435 _oval_component_evaluate_VARREFcxx . . $ _oval_component_evaluate_VARREF(4976d116c001d676).,
2436 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
2437 _oval_component_evaluate_BEGINcxx . . $ _oval_component_evaluate_BEGIN(4976d116c001d676).,
2438 _oval_component_evaluate_CONCATcxx . . $ _oval_component_evaluate_CONCAT(4976d116c001d676).,
2439 _oval_component_evaluate_ENDcxx . . $ _oval_component_evaluate_END(4976d116c001d676).,
2440 _oval_component_evaluate_SPLITcxx . . $ _oval_component_evaluate_SPLIT(4976d116c001d676).,
2441 _oval_component_evaluate_SUBSTRINGcxx . . $ _oval_component_evaluate_SUBSTRING(4976d116c001d676).,
2442 _oval_component_evaluate_TIMEDIFcxx . . $ _oval_component_evaluate_TIMEDIF(4976d116c001d676).,
2443 _oval_component_evaluate_ESCAPE_REGEXcxx . . $ _oval_component_evaluate_ESCAPE_REGEX(4976d116c001d676).,
2444 _oval_component_evaluate_REGEX_CAPTUREcxx . . $ _oval_component_evaluate_REGEX_CAPTURE(4976d116c001d676).,
2445 _oval_component_evaluate_ARITHMETICcxx . . $ _oval_component_evaluate_ARITHMETIC(4976d116c001d676).,
2446 _oval_component_evaluate_COUNTcxx . . $ _oval_component_evaluate_COUNT(4976d116c001d676).,
2447 _oval_component_evaluate_UNIQUEcxx . . $ _oval_component_evaluate_UNIQUE(4976d116c001d676).,
2448 _oval_component_evaluate_GLOB_TO_REGEXcxx . . $ _oval_component_evaluate_GLOB_TO_REGEX(4976d116c001d676).,
2449 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
2450 };
2451
2452 static oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(oval_argu_tcxx . . $ oval_argu_t# *argu,
2453 struct oval_componentcxx . . $ oval_component# *component,
2454 struct oval_collectioncxx . . $ oval_collection# *value_collection)
2455 {
2456 __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(component);
2457
2458 oval_component_type_tcxx . . $ oval_component_type_t# type = component->typecxx . . $ oval_component#type.;
2459 int evidx = (type > OVAL_FUNCTIONcxx . . $ `src/OVAL/public/oval_definitions.h:199:9`!) ? type - OVAL_FUNCTIONcxx . . $ `src/OVAL/public/oval_definitions.h:199:9`! + OVAL_COMPONENT_FUNCTIONcxx . . $ OVAL_COMPONENT_FUNCTION. : type;
2460 _oval_component_evaluatorcxx . . $ _oval_component_evaluator# *evaluator = (OVAL_COMPONENT_LITERALcxx . . $ OVAL_COMPONENT_LITERAL. <= type && type <= OVAL_FUNCTION_LASTcxx . . $ OVAL_FUNCTION_LAST.)
2461 ? _component_evaluatorscxx . . $ _component_evaluators.[evidx] : NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
2462 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# flag = SYSCHAR_FLAG_ERRORcxx . . $ SYSCHAR_FLAG_ERROR.;
2463 if (evaluator) {
2464 flag = (*evaluator) (argu, component, value_collection);
2465 } else {
2466 oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OVALcxx . . $ `src/common/public/oscap_error.h:61:9`!, "Component type %d not supported.", type);
2467 }
2468 return flag;
2469 }
2470
2471 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# oval_component_computecxx . . $ oval_component_compute(84e38aa81702685c).(struct oval_syschar_modelcxx . . $ oval_syschar_model# *sysmod,
2472 struct oval_componentcxx . . $ oval_component# *component,
2473 struct oval_collectioncxx . . $ oval_collection# *value_collection)
2474 {
2475 oval_argu_tcxx . . $ oval_argu_t# argu;
2476
2477 argu.modecxx . . $ $anonymous_type_5129a7513b63d2fa_0#mode. = OVAL_MODE_COMPUTEcxx . . $ $anonymous_type_5129a7513b63d2fa_0#OVAL_MODE_COMPUTE.;
2478 argu.ucxx . . $ $anonymous_type_5129a7513b63d2fa_0#u..sysmodcxx . . $ $anonymous_type_5129a7513b63d2fa_0#$anonymous_type_2#sysmod. = sysmod;
2479
2480 return oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(&argu, component, value_collection);
2481 }
2482 #if defined(OVAL_PROBES_ENABLEDcxx . . $ `build/config.h:67:9`!)
2483 oval_syschar_collection_flag_tcxx . . $ oval_syschar_collection_flag_t# oval_component_querycxx . . $ oval_component_query(5150778455fe2266).(oval_probe_session_tcxx . . $ oval_probe_session_t# *sess,
2484 struct oval_componentcxx . . $ oval_component# *component,
2485 struct oval_collectioncxx . . $ oval_collection# *value_collection)
2486 {
2487 oval_argu_tcxx . . $ oval_argu_t# argu;
2488
2489 argu.modecxx . . $ $anonymous_type_5129a7513b63d2fa_0#mode. = OVAL_MODE_QUERYcxx . . $ $anonymous_type_5129a7513b63d2fa_0#OVAL_MODE_QUERY.;
2490 argu.ucxx . . $ $anonymous_type_5129a7513b63d2fa_0#u..sesscxx . . $ $anonymous_type_5129a7513b63d2fa_0#$anonymous_type_2#sess. = sess;
2491
2492 return oval_component_eval_commoncxx . . $ oval_component_eval_common(4976d116c001d676).(&argu, component, value_collection);
2493 }
2494 #endif /* OVAL_PROBES_ENABLED */