| 1 | /** |
| 2 | * @file cpedict_priv.c |
| 3 | * \brief Interface to Common Platform Enumeration (CPE) Language |
| 4 | * |
| 5 | * See more details at http://nvd.nist.gov/cpe.cfm |
| 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 | * Maros Barabas <[email protected]> |
| 28 | * Šimon Lukašík |
| 29 | */ |
| 30 | |
| 31 | #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:409:9`! |
| 32 | #include <config.h>cxx . . $ `<file>/build/config.h`/ |
| 33 | #endif |
| 34 | |
| 35 | #include <libxml/xmlreader.h> |
| 36 | #include <stdlib.h> |
| 37 | // for functions isspace |
| 38 | #include <ctype.h> |
| 39 | // for functins memset, strcpy |
| 40 | #include <string.h> |
| 41 | #include <stdbool.h> |
| 42 | |
| 43 | #include "public/cpe_dict.h"cxx . . $ `<file>/src/CPE/public/cpe_dict.h`/ |
| 44 | #include "public/cpe_name.h"cxx . . $ `<file>/src/CPE/public/cpe_name.h`/ |
| 45 | #include "cpedict_ext_priv.h"cxx . . $ `<file>/src/CPE/cpedict_ext_priv.h`/ |
| 46 | #include "cpedict_priv.h"cxx . . $ `<file>/src/CPE/cpedict_priv.h`/ |
| 47 | #include "cpe_ctx_priv.h"cxx . . $ `<file>/src/CPE/cpe_ctx_priv.h`/ |
| 48 | |
| 49 | #include "common/list.h"cxx . . $ `<file>/src/common/list.h`/ |
| 50 | #include "common/elements.h"cxx . . $ `<file>/src/common/elements.h`/ |
| 51 | #include "common/text_priv.h"cxx . . $ `<file>/src/common/text_priv.h`/ |
| 52 | #include "common/util.h"cxx . . $ `<file>/src/common/util.h`/ |
| 53 | #include "common/_error.h"cxx . . $ `<file>/src/common/_error.h`/ |
| 54 | #include "common/xmlns_priv.h"cxx . . $ `<file>/src/common/xmlns_priv.h`/ |
| 55 | #include "common/xmltext_priv.h"cxx . . $ `<file>/src/common/xmltext_priv.h`/ |
| 56 | #include "source/oscap_source_priv.h"cxx . . $ `<file>/src/source/oscap_source_priv.h`/ |
| 57 | #include "source/public/oscap_source.h"cxx . . $ `<file>/src/source/public/oscap_source.h`/ |
| 58 | |
| 59 | /***************************************************************************/ |
| 60 | /* Variable definitions |
| 61 | * */ |
| 62 | |
| 63 | const char *PART_TO_CHARcxx . . $ PART_TO_CHAR.[] = { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, "h", "o", "a" }; |
| 64 | |
| 65 | /* **************************************** |
| 66 | * CPE-List structures |
| 67 | * ***************************************/ |
| 68 | |
| 69 | /* <cpe-item> |
| 70 | * */ |
| 71 | struct cpe_itemcxx . . $ cpe_item# { // the node <cpe-item> |
| 72 | |
| 73 | struct cpe_namecxx . . $ cpe_name# *namecxx . . $ cpe_item#name.; // CPE name as CPE URI |
| 74 | struct oscap_listcxx . . $ oscap_list# *titlescxx . . $ cpe_item#titles.; // titles of cpe-item (can be in various languages) |
| 75 | |
| 76 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! deprecatedcxx . . $ cpe_item#deprecated.; ///< deprecated attribute |
| 77 | struct cpe_namecxx . . $ cpe_name# *deprecated_bycxx . . $ cpe_item#deprecated_by.; ///< deprecated_by attribute, the CPE name that deprecated this |
| 78 | char *deprecation_datecxx . . $ cpe_item#deprecation_date.; // date of deprecation |
| 79 | |
| 80 | struct oscap_listcxx . . $ oscap_list# *referencescxx . . $ cpe_item#references.; // list of references |
| 81 | struct oscap_listcxx . . $ oscap_list# *checkscxx . . $ cpe_item#checks.; // list of checks |
| 82 | struct oscap_listcxx . . $ oscap_list# *notescxx . . $ cpe_item#notes.; // list of notes - it's the same structure as titles |
| 83 | struct cpe_item_metadatacxx . . $ cpe_item_metadata# *metadatacxx . . $ cpe_item#metadata.; // element <meta:item-metadata> |
| 84 | struct cpe23_itemcxx . . $ cpe23_item# *cpe23_itemcxx . . $ cpe_item#cpe23_item.; ///< element <cpe23-item> |
| 85 | structcxx . . $ cpe_item#$anonymous_type_0# { |
| 86 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! deprecatedcxx . . $ cpe_item#$anonymous_type_0#deprecated.:1; ///< Is the deprecated atrtribute specified in XML? |
| 87 | } exportcxx . . $ cpe_item#export.; |
| 88 | }; |
| 89 | OSCAP_GETTERcxx . . $ `src/common/util.h:111:9`!(struct cpe_name *, cpe_item, name) |
| 90 | OSCAP_SETTER_GENERICcxx . . $ `src/common/util.h:215:9`!(cpe_item, struct cpe_name *, name, cpe_name_free, ) |
| 91 | OSCAP_GETTERcxx . . $ `src/common/util.h:111:9`!(struct cpe_name *, cpe_item, deprecated_by) |
| 92 | OSCAP_SETTER_GENERICcxx . . $ `src/common/util.h:215:9`!(cpe_item, struct cpe_name *, deprecated_by, cpe_name_free, ) |
| 93 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_item, deprecation_date) |
| 94 | OSCAP_GETTERcxx . . $ `src/common/util.h:111:9`!(struct cpe_item_metadata *, cpe_item, metadata) |
| 95 | OSCAP_IGETINS_GENcxx . . $ `src/common/util.h:286:9`!(cpe_reference, cpe_item, references, reference) |
| 96 | OSCAP_IGETINS_GENcxx . . $ `src/common/util.h:286:9`!(cpe_check, cpe_item, checks, check) |
| 97 | OSCAP_IGETINScxx . . $ `src/common/util.h:283:9`!(oscap_text, cpe_item, titles, title) |
| 98 | OSCAP_ITERATOR_REMOVE_Fcxx . . $ `src/common/util.h:128:9`!(cpe_reference) OSCAP_ITERATOR_REMOVE_Fcxx . . $ `src/common/util.h:128:9`!(cpe_check) |
| 99 | |
| 100 | struct cpe_notescxx . . $ cpe_notes# { ///< representation of <notes> element |
| 101 | char *langcxx . . $ cpe_notes#lang.; ///< xml:lang attribute |
| 102 | struct oscap_listcxx . . $ oscap_list# *notescxx . . $ cpe_notes#notes.; ///< list of inner <note> elements |
| 103 | }; |
| 104 | |
| 105 | /* <cpe-item><item-metadata> |
| 106 | * */ |
| 107 | struct cpe_item_metadatacxx . . $ cpe_item_metadata# { |
| 108 | char *modification_datecxx . . $ cpe_item_metadata#modification_date.; |
| 109 | char *statuscxx . . $ cpe_item_metadata#status.; |
| 110 | char *nvd_idcxx . . $ cpe_item_metadata#nvd_id.; |
| 111 | char *deprecated_by_nvd_idcxx . . $ cpe_item_metadata#deprecated_by_nvd_id.; |
| 112 | }; |
| 113 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_item_metadata, modification_date) |
| 114 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_item_metadata, status) |
| 115 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_item_metadata, nvd_id) |
| 116 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_item_metadata, deprecated_by_nvd_id) |
| 117 | |
| 118 | /* <cpe-item><check> |
| 119 | * */ |
| 120 | struct cpe_checkcxx . . $ cpe_check# { |
| 121 | char *systemcxx . . $ cpe_check#system.; // system check URI |
| 122 | char *hrefcxx . . $ cpe_check#href.; // external file reference (NULL if not present) |
| 123 | char *identifiercxx . . $ cpe_check#identifier.; // test identifier |
| 124 | }; |
| 125 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_check, system) |
| 126 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_check, href) |
| 127 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_check, identifier) |
| 128 | |
| 129 | /* <cpe-item><references><reference> |
| 130 | * */ |
| 131 | struct cpe_referencecxx . . $ cpe_reference# { |
| 132 | char *hrefcxx . . $ cpe_reference#href.; // reference URL |
| 133 | char *contentcxx . . $ cpe_reference#content.; // reference description |
| 134 | }; |
| 135 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_reference, href) |
| 136 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_reference, content) |
| 137 | |
| 138 | /* <generator> |
| 139 | * */ |
| 140 | struct cpe_generatorcxx . . $ cpe_generator# { |
| 141 | char *product_namecxx . . $ cpe_generator#product_name.; // generator software name |
| 142 | char *product_versioncxx . . $ cpe_generator#product_version.; // generator software version |
| 143 | char *schema_versioncxx . . $ cpe_generator#schema_version.; // generator schema version |
| 144 | char *timestampcxx . . $ cpe_generator#timestamp.; // generation date and time |
| 145 | }; |
| 146 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_generator, product_name) |
| 147 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_generator, product_version) |
| 148 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_generator, schema_version) |
| 149 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_generator, timestamp) |
| 150 | |
| 151 | OSCAP_GETTERcxx . . $ `src/common/util.h:111:9`!(struct cpe_generator *, cpe_dict_model, generator) |
| 152 | OSCAP_ACCESSOR_SIMPLEcxx . . $ `src/common/util.h:258:9`!(int, cpe_dict_model, base_version) |
| 153 | OSCAP_IGETINS_GENcxx . . $ `src/common/util.h:286:9`!(cpe_item, cpe_dict_model, items, item) OSCAP_ITERATOR_REMOVE_Fcxx . . $ `src/common/util.h:128:9`!(cpe_item) |
| 154 | OSCAP_IGETINS_GENcxx . . $ `src/common/util.h:286:9`!(cpe_vendor, cpe_dict_model, vendors, vendor) OSCAP_ITERATOR_REMOVE_Fcxx . . $ `src/common/util.h:128:9`!(cpe_vendor) |
| 155 | |
| 156 | /* **************************************** |
| 157 | * Component-tree structures |
| 158 | * ***************************************/ |
| 159 | /* vendor |
| 160 | * */ |
| 161 | struct cpe_vendorcxx . . $ cpe_vendor# { |
| 162 | char *valuecxx . . $ cpe_vendor#value.; |
| 163 | struct oscap_listcxx . . $ oscap_list# *titlescxx . . $ cpe_vendor#titles.; |
| 164 | struct oscap_listcxx . . $ oscap_list# *productscxx . . $ cpe_vendor#products.; |
| 165 | }; |
| 166 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_vendor, value) |
| 167 | OSCAP_IGETINScxx . . $ `src/common/util.h:283:9`!(oscap_text, cpe_vendor, titles, title) |
| 168 | OSCAP_IGETINS_GENcxx . . $ `src/common/util.h:286:9`!(cpe_product, cpe_vendor, products, product) |
| 169 | OSCAP_ITERATOR_REMOVE_Fcxx . . $ `src/common/util.h:128:9`!(cpe_product) |
| 170 | |
| 171 | /* vendor -> product |
| 172 | * */ |
| 173 | struct cpe_productcxx . . $ cpe_product# { |
| 174 | char *valuecxx . . $ cpe_product#value.; |
| 175 | cpe_part_tcxx . . $ cpe_part_t# partcxx . . $ cpe_product#part.; |
| 176 | struct oscap_listcxx . . $ oscap_list# *versionscxx . . $ cpe_product#versions.; |
| 177 | }; |
| 178 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_product, value) |
| 179 | OSCAP_ACCESSOR_SIMPLEcxx . . $ `src/common/util.h:258:9`!(cpe_part_t, cpe_product, part) |
| 180 | OSCAP_IGETINS_GENcxx . . $ `src/common/util.h:286:9`!(cpe_version, cpe_product, versions, version) |
| 181 | OSCAP_ITERATOR_REMOVE_Fcxx . . $ `src/common/util.h:128:9`!(cpe_version) |
| 182 | |
| 183 | /* vendor -> product -> version |
| 184 | * */ |
| 185 | struct cpe_versioncxx . . $ cpe_version# { |
| 186 | char *valuecxx . . $ cpe_version#value.; |
| 187 | struct oscap_listcxx . . $ oscap_list# *updatescxx . . $ cpe_version#updates.; |
| 188 | }; |
| 189 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_version, value) |
| 190 | OSCAP_IGETINS_GENcxx . . $ `src/common/util.h:286:9`!(cpe_update, cpe_version, updates, update) |
| 191 | OSCAP_ITERATOR_REMOVE_Fcxx . . $ `src/common/util.h:128:9`!(cpe_update) |
| 192 | |
| 193 | /* vendor -> product -> version -> update |
| 194 | * */ |
| 195 | struct cpe_updatecxx . . $ cpe_update# { |
| 196 | char *valuecxx . . $ cpe_update#value.; |
| 197 | struct oscap_listcxx . . $ oscap_list# *editionscxx . . $ cpe_update#editions.; |
| 198 | }; |
| 199 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_update, value) |
| 200 | OSCAP_IGETINS_GENcxx . . $ `src/common/util.h:286:9`!(cpe_edition, cpe_update, editions, edition) |
| 201 | OSCAP_ITERATOR_REMOVE_Fcxx . . $ `src/common/util.h:128:9`!(cpe_edition) |
| 202 | |
| 203 | /* vendor -> product -> version -> update -> edition |
| 204 | * */ |
| 205 | struct cpe_editioncxx . . $ cpe_edition# { |
| 206 | char *valuecxx . . $ cpe_edition#value.; |
| 207 | struct oscap_listcxx . . $ oscap_list# *languagescxx . . $ cpe_edition#languages.; |
| 208 | }; |
| 209 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_edition, value) |
| 210 | OSCAP_IGETINS_GENcxx . . $ `src/common/util.h:286:9`!(cpe_language, cpe_edition, languages, language) |
| 211 | OSCAP_ITERATOR_REMOVE_Fcxx . . $ `src/common/util.h:128:9`!(cpe_language) |
| 212 | |
| 213 | /* vendor -> product -> version -> update -> edition -> language |
| 214 | * */ |
| 215 | struct cpe_languagecxx . . $ cpe_language# { |
| 216 | char *valuecxx . . $ cpe_language#value.; |
| 217 | }; |
| 218 | OSCAP_ACCESSOR_STRINGcxx . . $ `src/common/util.h:245:9`!(cpe_language, value) |
| 219 | |
| 220 | /* End of variable definitions |
| 221 | * */ |
| 222 | /***************************************************************************/ |
| 223 | /***************************************************************************/ |
| 224 | /* XML string variables definitions |
| 225 | * */ |
| 226 | #define TAG_CHECK_STRcxx . . $ `src/CPE/cpedict_priv.c:226:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "check" |
| 227 | #define TAG_NOTES_STRcxx . . $ `src/CPE/cpedict_priv.c:227:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "notes" |
| 228 | #define TAG_REFERENCES_STRcxx . . $ `src/CPE/cpedict_priv.c:228:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "references" |
| 229 | #define ATTR_DEP_BY_NVDID_STRcxx . . $ `src/CPE/cpedict_priv.c:229:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "deprecated-by-nvd-id" |
| 230 | #define ATTR_NVD_ID_STRcxx . . $ `src/CPE/cpedict_priv.c:230:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "nvd-id" |
| 231 | #define ATTR_STATUS_STRcxx . . $ `src/CPE/cpedict_priv.c:231:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "status" |
| 232 | #define ATTR_MODIFICATION_DATE_STRcxx . . $ `src/CPE/cpedict_priv.c:232:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "modification-date" |
| 233 | #define TAG_ITEM_METADATA_STRcxx . . $ `src/CPE/cpedict_priv.c:233:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "item-metadata" |
| 234 | #define TAG_REFERENCE_STRcxx . . $ `src/CPE/cpedict_priv.c:234:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "reference" |
| 235 | #define TAG_NOTE_STRcxx . . $ `src/CPE/cpedict_priv.c:235:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "note" |
| 236 | #define TAG_TITLE_STRcxx . . $ `src/CPE/cpedict_priv.c:236:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "title" |
| 237 | #define TAG_CPE_ITEM_STRcxx . . $ `src/CPE/cpedict_priv.c:237:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "cpe-item" |
| 238 | #define ATTR_DEPRECATION_DATE_STRcxx . . $ `src/CPE/cpedict_priv.c:238:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "deprecation_date" |
| 239 | #define ATTR_DEPRECATED_BY_STRcxx . . $ `src/CPE/cpedict_priv.c:239:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "deprecated_by" |
| 240 | #define ATTR_DEPRECATED_STRcxx . . $ `src/CPE/cpedict_priv.c:240:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "deprecated" |
| 241 | #define ATTR_NAME_STRcxx . . $ `src/CPE/cpedict_priv.c:241:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "name" |
| 242 | /* Generator */ |
| 243 | #define TAG_GENERATOR_STRcxx . . $ `src/CPE/cpedict_priv.c:243:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "generator" |
| 244 | #define TAG_PRODUCT_STRcxx . . $ `src/CPE/cpedict_priv.c:244:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "product" |
| 245 | #define TAG_PRODUCT_NAME_STRcxx . . $ `src/CPE/cpedict_priv.c:245:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "product_name" |
| 246 | #define TAG_PRODUCT_VERSION_STRcxx . . $ `src/CPE/cpedict_priv.c:246:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "product_version" |
| 247 | #define TAG_SCHEMA_VERSION_STRcxx . . $ `src/CPE/cpedict_priv.c:247:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "schema_version" |
| 248 | #define TAG_TIMESTAMP_STRcxx . . $ `src/CPE/cpedict_priv.c:248:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "timestamp" |
| 249 | #define TAG_COMPONENT_TREE_STRcxx . . $ `src/CPE/cpedict_priv.c:249:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "component-tree" |
| 250 | #define TAG_VENDOR_STRcxx . . $ `src/CPE/cpedict_priv.c:250:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "vendor" |
| 251 | #define TAG_CPE_LIST_STRcxx . . $ `src/CPE/cpedict_priv.c:251:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "cpe-list" |
| 252 | #define TAG_VERSION_STRcxx . . $ `src/CPE/cpedict_priv.c:252:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "version" |
| 253 | #define TAG_UPDATE_STRcxx . . $ `src/CPE/cpedict_priv.c:253:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "update" |
| 254 | #define TAG_EDITION_STRcxx . . $ `src/CPE/cpedict_priv.c:254:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "edition" |
| 255 | #define TAG_LANGUAGE_STRcxx . . $ `src/CPE/cpedict_priv.c:255:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "language" |
| 256 | #define ATTR_VALUE_STRcxx . . $ `src/CPE/cpedict_priv.c:256:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "value" |
| 257 | #define ATTR_PART_STRcxx . . $ `src/CPE/cpedict_priv.c:257:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "part" |
| 258 | #define ATTR_SYSTEM_STRcxx . . $ `src/CPE/cpedict_priv.c:258:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "system" |
| 259 | #define ATTR_HREF_STRcxx . . $ `src/CPE/cpedict_priv.c:259:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "href" |
| 260 | #define NS_META_STRcxx . . $ `src/CPE/cpedict_priv.c:260:9`! BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "meta" |
| 261 | #define ATTR_XML_LANG_STRcxx . . $ `src/CPE/cpedict_priv.c:261:9`! BAD_CAST "xml:lang" |
| 262 | #define VAL_TRUE_STRcxx . . $ `src/CPE/cpedict_priv.c:262:9`! BAD_CAST "true" |
| 263 | /* End of XML string variables definitions |
| 264 | * */ |
| 265 | /***************************************************************************/ |
| 266 | /***************************************************************************/ |
| 267 | /* Declaration of static (private to this file) functions |
| 268 | * These function shoud not be called from outside. For exporting these elements |
| 269 | * has to call parent element's |
| 270 | */ |
| 271 | static struct cpe_referencecxx . . $ cpe_reference# *cpe_reference_parsecxx . . $ cpe_reference_parse(aec5a6ea585a2236).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader); |
| 272 | static struct cpe_checkcxx . . $ cpe_check# *cpe_check_parsecxx . . $ cpe_check_parse(9eac20fa79478bd7).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader); |
| 273 | static struct cpe_notescxx . . $ cpe_notes# *cpe_notes_parsecxx . . $ cpe_notes_parse(f06dd0d7906747bc).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader); |
| 274 | |
| 275 | static void cpe_product_exportcxx . . $ cpe_product_export(3b6b190b85edef77).(const struct cpe_productcxx . . $ cpe_product# *product, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer); |
| 276 | static void cpe_version_exportcxx . . $ cpe_version_export(20aaaef5e0ce5918).(const struct cpe_versioncxx . . $ cpe_version# *version, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer); |
| 277 | static void cpe_update_exportcxx . . $ cpe_update_export(69705bf787c0854).(const struct cpe_updatecxx . . $ cpe_update# *update, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer); |
| 278 | static void cpe_edition_exportcxx . . $ cpe_edition_export(8872c4dd1933832f).(const struct cpe_editioncxx . . $ cpe_edition# *edition, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer); |
| 279 | static void cpe_language_exportcxx . . $ cpe_language_export(24459941b6a2f1fb).(const struct cpe_languagecxx . . $ cpe_language# *language, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer); |
| 280 | static void cpe_check_exportcxx . . $ cpe_check_export(8c6c84b6ae9161b7).(const struct cpe_checkcxx . . $ cpe_check# *check, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer); |
| 281 | static void cpe_reference_exportcxx . . $ cpe_reference_export(618380b14d469529).(const struct cpe_referencecxx . . $ cpe_reference# *ref, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer); |
| 282 | static void cpe_notes_exportcxx . . $ cpe_notes_export(526db04bd1cd24c1).(const struct cpe_notescxx . . $ cpe_notes# *notes, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer); |
| 283 | |
| 284 | struct cpe_notescxx . . $ cpe_notes# *cpe_notes_newcxx . . $ cpe_notes_new(e6920f0093c664ee).(void); |
| 285 | void cpe_notes_freecxx . . $ cpe_notes_free(628608e694f68eda).(struct cpe_notescxx . . $ cpe_notes# *notes); |
| 286 | |
| 287 | /***************************************************************************/ |
| 288 | |
| 289 | /* Constructors of CPE structures cpe_*<structure>*_new() |
| 290 | * More info in representive header file. |
| 291 | * returns the type of <structure> |
| 292 | */ |
| 293 | struct cpe_dict_modelcxx . . $ cpe_dict_model# *cpe_dict_model_newcxx . . $ cpe_dict_model_new(47d602a8ef9cee25).() |
| 294 | { |
| 295 | |
| 296 | struct cpe_dict_modelcxx . . $ cpe_dict_model# *dict; |
| 297 | |
| 298 | dict = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_dict_modelcxx . . $ cpe_dict_model#)); |
| 299 | if (dict == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 300 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 301 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(dict, 0, sizeof(struct cpe_dict_modelcxx . . $ cpe_dict_model#)); |
| 302 | |
| 303 | dict->vendorscxx . . $ cpe_dict_model#vendors. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).(); |
| 304 | dict->itemscxx . . $ cpe_dict_model#items. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).(); |
| 305 | |
| 306 | dict->base_versioncxx . . $ cpe_dict_model#base_version. = 2; // default to CPE 2.x |
| 307 | |
| 308 | dict->origin_filecxx . . $ cpe_dict_model#origin_file. = 0; |
| 309 | |
| 310 | return dict; |
| 311 | } |
| 312 | |
| 313 | struct cpe_item_metadatacxx . . $ cpe_item_metadata# *cpe_item_metadata_newcxx . . $ cpe_item_metadata_new(7301cca23032b45a).() |
| 314 | { |
| 315 | |
| 316 | struct cpe_item_metadatacxx . . $ cpe_item_metadata# *item; |
| 317 | |
| 318 | item = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_item_metadatacxx . . $ cpe_item_metadata#)); |
| 319 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 320 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 321 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(item, 0, sizeof(struct cpe_item_metadatacxx . . $ cpe_item_metadata#)); |
| 322 | |
| 323 | item->modification_datecxx . . $ cpe_item_metadata#modification_date. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 324 | item->statuscxx . . $ cpe_item_metadata#status. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 325 | item->nvd_idcxx . . $ cpe_item_metadata#nvd_id. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 326 | item->deprecated_by_nvd_idcxx . . $ cpe_item_metadata#deprecated_by_nvd_id. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 327 | |
| 328 | return item; |
| 329 | } |
| 330 | |
| 331 | struct cpe_itemcxx . . $ cpe_item# *cpe_item_newcxx . . $ cpe_item_new(5d3974f100c54e7f).() |
| 332 | { |
| 333 | |
| 334 | struct cpe_itemcxx . . $ cpe_item# *item; |
| 335 | |
| 336 | item = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_itemcxx . . $ cpe_item#)); |
| 337 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 338 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 339 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(item, 0, sizeof(struct cpe_itemcxx . . $ cpe_item#)); |
| 340 | |
| 341 | item->notescxx . . $ cpe_item#notes. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).(); |
| 342 | item->referencescxx . . $ cpe_item#references. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).(); |
| 343 | item->checkscxx . . $ cpe_item#checks. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).(); |
| 344 | item->titlescxx . . $ cpe_item#titles. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).(); |
| 345 | |
| 346 | return item; |
| 347 | } |
| 348 | |
| 349 | struct cpe_checkcxx . . $ cpe_check# *cpe_check_newcxx . . $ cpe_check_new(2f822a65544aedf5).() |
| 350 | { |
| 351 | |
| 352 | struct cpe_checkcxx . . $ cpe_check# *item; |
| 353 | |
| 354 | item = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_checkcxx . . $ cpe_check#)); |
| 355 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 356 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 357 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(item, 0, sizeof(struct cpe_checkcxx . . $ cpe_check#)); |
| 358 | |
| 359 | item->systemcxx . . $ cpe_check#system. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 360 | item->hrefcxx . . $ cpe_check#href. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 361 | item->identifiercxx . . $ cpe_check#identifier. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 362 | |
| 363 | return item; |
| 364 | } |
| 365 | |
| 366 | struct cpe_referencecxx . . $ cpe_reference# *cpe_reference_newcxx . . $ cpe_reference_new(594c84caae4ff6a4).() |
| 367 | { |
| 368 | |
| 369 | struct cpe_referencecxx . . $ cpe_reference# *item; |
| 370 | |
| 371 | item = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_referencecxx . . $ cpe_reference#)); |
| 372 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 373 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 374 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(item, 0, sizeof(struct cpe_referencecxx . . $ cpe_reference#)); |
| 375 | |
| 376 | item->hrefcxx . . $ cpe_reference#href. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 377 | item->contentcxx . . $ cpe_reference#content. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 378 | |
| 379 | return item; |
| 380 | } |
| 381 | |
| 382 | struct cpe_notescxx . . $ cpe_notes# *cpe_notes_newcxx . . $ cpe_notes_new(e6920f0093c664ee).(void) |
| 383 | { |
| 384 | struct cpe_notescxx . . $ cpe_notes# *notes = calloccxx . . $ calloc(63a7bf2941bfcd7a).(1, sizeof(struct cpe_notescxx . . $ cpe_notes#)); |
| 385 | notes->notescxx . . $ cpe_notes#notes. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).(); |
| 386 | return notes; |
| 387 | } |
| 388 | |
| 389 | struct cpe_generatorcxx . . $ cpe_generator# *cpe_generator_newcxx . . $ cpe_generator_new(f927dc516746c56).() |
| 390 | { |
| 391 | |
| 392 | struct cpe_generatorcxx . . $ cpe_generator# *item; |
| 393 | |
| 394 | item = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_generatorcxx . . $ cpe_generator#)); |
| 395 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 396 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 397 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(item, 0, sizeof(struct cpe_generatorcxx . . $ cpe_generator#)); |
| 398 | |
| 399 | item->product_namecxx . . $ cpe_generator#product_name. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 400 | item->product_versioncxx . . $ cpe_generator#product_version. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 401 | item->schema_versioncxx . . $ cpe_generator#schema_version. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 402 | item->timestampcxx . . $ cpe_generator#timestamp. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 403 | |
| 404 | return item; |
| 405 | } |
| 406 | |
| 407 | struct cpe_vendorcxx . . $ cpe_vendor# *cpe_vendor_newcxx . . $ cpe_vendor_new(ada4bafd0a6f5c95).() |
| 408 | { |
| 409 | |
| 410 | struct cpe_vendorcxx . . $ cpe_vendor# *item; |
| 411 | |
| 412 | item = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_vendorcxx . . $ cpe_vendor#)); |
| 413 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 414 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 415 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(item, 0, sizeof(struct cpe_vendorcxx . . $ cpe_vendor#)); |
| 416 | |
| 417 | item->valuecxx . . $ cpe_vendor#value. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 418 | item->titlescxx . . $ cpe_vendor#titles. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).(); |
| 419 | item->productscxx . . $ cpe_vendor#products. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).(); |
| 420 | |
| 421 | return item; |
| 422 | } |
| 423 | |
| 424 | struct cpe_productcxx . . $ cpe_product# *cpe_product_newcxx . . $ cpe_product_new(db9e708c6560c5a0).() |
| 425 | { |
| 426 | |
| 427 | struct cpe_productcxx . . $ cpe_product# *item; |
| 428 | |
| 429 | item = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_productcxx . . $ cpe_product#)); |
| 430 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 431 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 432 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(item, 0, sizeof(struct cpe_productcxx . . $ cpe_product#)); |
| 433 | |
| 434 | item->versionscxx . . $ cpe_product#versions. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).(); |
| 435 | item->valuecxx . . $ cpe_product#value. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 436 | |
| 437 | return item; |
| 438 | } |
| 439 | |
| 440 | struct cpe_versioncxx . . $ cpe_version# *cpe_version_newcxx . . $ cpe_version_new(2ebd60e31b9338a9).() |
| 441 | { |
| 442 | |
| 443 | struct cpe_versioncxx . . $ cpe_version# *item; |
| 444 | |
| 445 | item = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_versioncxx . . $ cpe_version#)); |
| 446 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 447 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 448 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(item, 0, sizeof(struct cpe_versioncxx . . $ cpe_version#)); |
| 449 | |
| 450 | item->updatescxx . . $ cpe_version#updates. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).(); |
| 451 | item->valuecxx . . $ cpe_version#value. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 452 | |
| 453 | return item; |
| 454 | } |
| 455 | |
| 456 | struct cpe_updatecxx . . $ cpe_update# *cpe_update_newcxx . . $ cpe_update_new(1687917a96d38ef6).() |
| 457 | { |
| 458 | |
| 459 | struct cpe_updatecxx . . $ cpe_update# *item; |
| 460 | |
| 461 | item = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_updatecxx . . $ cpe_update#)); |
| 462 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 463 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 464 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(item, 0, sizeof(struct cpe_updatecxx . . $ cpe_update#)); |
| 465 | |
| 466 | item->editionscxx . . $ cpe_update#editions. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).(); |
| 467 | item->valuecxx . . $ cpe_update#value. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 468 | |
| 469 | return item; |
| 470 | } |
| 471 | |
| 472 | struct cpe_editioncxx . . $ cpe_edition# *cpe_edition_newcxx . . $ cpe_edition_new(81355ef26abe0244).() |
| 473 | { |
| 474 | |
| 475 | struct cpe_editioncxx . . $ cpe_edition# *item; |
| 476 | |
| 477 | item = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_editioncxx . . $ cpe_edition#)); |
| 478 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 479 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 480 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(item, 0, sizeof(struct cpe_editioncxx . . $ cpe_edition#)); |
| 481 | |
| 482 | item->languagescxx . . $ cpe_edition#languages. = oscap_list_newcxx . . $ oscap_list_new(ea215f73c8361bff).(); |
| 483 | item->valuecxx . . $ cpe_edition#value. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 484 | |
| 485 | return item; |
| 486 | } |
| 487 | |
| 488 | struct cpe_languagecxx . . $ cpe_language# *cpe_language_newcxx . . $ cpe_language_new(a44a94a5e2bf97b2).() |
| 489 | { |
| 490 | |
| 491 | struct cpe_languagecxx . . $ cpe_language# *item; |
| 492 | |
| 493 | item = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_languagecxx . . $ cpe_language#)); |
| 494 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 495 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 496 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(item, 0, sizeof(struct cpe_languagecxx . . $ cpe_language#)); |
| 497 | |
| 498 | item->valuecxx . . $ cpe_language#value. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 499 | |
| 500 | return item; |
| 501 | } |
| 502 | |
| 503 | /* End of CPE structures' contructors |
| 504 | * */ |
| 505 | /***************************************************************************/ |
| 506 | |
| 507 | /***************************************************************************/ |
| 508 | /* Private parsing functions cpe_*<structure>*_parse( xmlTextReaderPtr ) |
| 509 | * More info in representive header file. |
| 510 | * returns the type of <structure> |
| 511 | */ |
| 512 | struct cpe_dict_modelcxx . . $ cpe_dict_model# *cpe_dict_model_parsecxx . . $ cpe_dict_model_parse(d014d982a14f83fe).(struct cpe_parser_ctxcxx . . $ cpe_parser_ctx# *ctx) |
| 513 | { |
| 514 | |
| 515 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(ctx); |
| 516 | xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader = cpe_parser_ctx_get_readercxx . . $ cpe_parser_ctx_get_reader(85a830d77083ba03).(ctx); |
| 517 | |
| 518 | struct cpe_dict_modelcxx . . $ cpe_dict_model# *ret = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 519 | struct cpe_itemcxx . . $ cpe_item# *item = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 520 | struct cpe_vendorcxx . . $ cpe_vendor# *vendor = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 521 | int next_ret = 1; |
| 522 | |
| 523 | // let's find "<cpe-list>" element |
| 524 | while (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_CPE_LIST_STRcxx . . $ `src/CPE/cpedict_priv.c:251:9`!) && (next_ret == 1)) { |
| 525 | next_ret = xmlTextReaderNextElementcxx . . $ xmlTextReaderNextElement(82a242a19623f75).(reader); |
| 526 | // There is no "<cpe-list>" element :(( and we are at the end of file ! |
| 527 | if (next_ret == 0) { |
| 528 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, |
| 529 | "There is no \"cpe-list\" element in the provided xml tree !\n"); |
| 530 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 531 | } |
| 532 | } |
| 533 | |
| 534 | // make sure we exit when we reach this depth again |
| 535 | int entry_depth = xmlTextReaderDepthcxx . . $ xmlTextReaderDepth(82a242a19623f75).(reader); |
| 536 | |
| 537 | // we found cpe-list element, let's roll ! |
| 538 | // allocate memory for cpe_dict so we can fill items and vendors and general structures |
| 539 | ret = cpe_dict_model_newcxx . . $ cpe_dict_model_new(47d602a8ef9cee25).(); |
| 540 | if (ret == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 541 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 542 | |
| 543 | // let us figure out the base version based on the namespace of cpe-list |
| 544 | const xmlCharcxx . . $ xmlChar#* nsuri = xmlTextReaderConstNamespaceUricxx . . $ xmlTextReaderConstNamespaceUri(60a5affeeceb06fd).(reader); |
| 545 | |
| 546 | if (nsuri && !xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(nsuri, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! XMLNS_CPE1Dcxx . . $ `src/common/xmlns_priv.h:32:9`!)) |
| 547 | { |
| 548 | cpe_dict_model_set_base_versioncxx . . $ cpe_dict_model_set_base_version(b7d4d55d9ccaebfe).(ret, 1); |
| 549 | } |
| 550 | else if (nsuri && !xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(nsuri, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! XMLNS_CPE2Dcxx . . $ `src/common/xmlns_priv.h:34:9`!)) { |
| 551 | cpe_dict_model_set_base_versioncxx . . $ cpe_dict_model_set_base_version(b7d4d55d9ccaebfe).(ret, 2); |
| 552 | } |
| 553 | else |
| 554 | { |
| 555 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, "Can't figure out CPE version from namespace URI '%s'. Assuming CPE 2.x.", nsuri); |
| 556 | // unknown version, let us default to CPE 2.x and hope for the best :-/ |
| 557 | cpe_dict_model_set_base_versioncxx . . $ cpe_dict_model_set_base_version(b7d4d55d9ccaebfe).(ret, 2); |
| 558 | } |
| 559 | |
| 560 | // go through elements and switch through actions till end of file.. |
| 561 | next_ret = xmlTextReaderNextElementWEcxx . . $ xmlTextReaderNextElementWE(3030c74046fb4b82).(reader, TAG_CPE_LIST_STRcxx . . $ `src/CPE/cpedict_priv.c:251:9`!); |
| 562 | while (next_ret != 0) { |
| 563 | if (xmlTextReaderDepthcxx . . $ xmlTextReaderDepth(82a242a19623f75).(reader) <= entry_depth) { |
| 564 | // we have reached the end of <cpe-list> |
| 565 | // this is necessary to make XCCDF CPE integration to work |
| 566 | break; |
| 567 | } |
| 568 | |
| 569 | if (!xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_GENERATOR_STRcxx . . $ `src/CPE/cpedict_priv.c:243:9`!)) { // <generator> | count = 1 |
| 570 | ret->generatorcxx . . $ cpe_dict_model#generator. = cpe_generator_parsecxx . . $ cpe_generator_parse(76548b63e5a1c9fc).(ctx); |
| 571 | } else if (!xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_CPE_ITEM_STRcxx . . $ `src/CPE/cpedict_priv.c:237:9`!)) { // <cpe-item> | cout = 0-n |
| 572 | if ((item = cpe_item_parsecxx . . $ cpe_item_parse(39ba1f7d39abb029).(ctx)) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 573 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, "Failed to parse cpe-item"); |
| 574 | cpe_dict_model_freecxx . . $ cpe_dict_model_free(99656294ab2c75d7).(ret); |
| 575 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 576 | } |
| 577 | // We got an item ! |
| 578 | if (!cpe_dict_model_add_itemcxx . . $ cpe_dict_model_add_item(b7551f7a3ead58b).(ret, item)) { |
| 579 | cpe_item_freecxx . . $ cpe_item_free(932b5cee17544225).(item); |
| 580 | cpe_dict_model_freecxx . . $ cpe_dict_model_free(99656294ab2c75d7).(ret); |
| 581 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 582 | } |
| 583 | } else if (!xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_VENDOR_STRcxx . . $ `src/CPE/cpedict_priv.c:250:9`!)) { // <vendor> | count = 0-n |
| 584 | vendor = cpe_vendor_parsecxx . . $ cpe_vendor_parse(869b5aacb6b94023).(reader); |
| 585 | if (vendor) |
| 586 | oscap_list_addcxx . . $ oscap_list_add(97f28760a5cf7823).(ret->vendorscxx . . $ cpe_dict_model#vendors., vendor); |
| 587 | } else |
| 588 | // TODO: we need to store meta xml data of <component-tree> element |
| 589 | if (!xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_COMPONENT_TREE_STRcxx . . $ `src/CPE/cpedict_priv.c:249:9`!)) { // <vendor> | count = 0-n |
| 590 | // we just need to jump over this element |
| 591 | } else if (xmlTextReaderNodeTypecxx . . $ xmlTextReaderNodeType(82a242a19623f75).(reader) == XML_READER_TYPE_ELEMENTcxx . . $ XML_READER_TYPE_ELEMENT.) { |
| 592 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, "Unknown XML element in CPE dictionary, local name is '%s'.", xmlTextReaderConstLocalName(reader)); |
| 593 | } |
| 594 | |
| 595 | next_ret = xmlTextReaderNextElementWEcxx . . $ xmlTextReaderNextElementWE(3030c74046fb4b82).(reader, TAG_CPE_LIST_STRcxx . . $ `src/CPE/cpedict_priv.c:251:9`!); |
| 596 | } |
| 597 | |
| 598 | return ret; |
| 599 | } |
| 600 | |
| 601 | struct cpe_generatorcxx . . $ cpe_generator# *cpe_generator_parsecxx . . $ cpe_generator_parse(76548b63e5a1c9fc).(struct cpe_parser_ctxcxx . . $ cpe_parser_ctx# *ctx) |
| 602 | { |
| 603 | |
| 604 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(ctx); |
| 605 | xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader = cpe_parser_ctx_get_readercxx . . $ cpe_parser_ctx_get_reader(85a830d77083ba03).(ctx); |
| 606 | |
| 607 | struct cpe_generatorcxx . . $ cpe_generator# *ret = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 608 | |
| 609 | if (!xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_GENERATOR_STRcxx . . $ `src/CPE/cpedict_priv.c:243:9`!) && |
| 610 | xmlTextReaderNodeTypecxx . . $ xmlTextReaderNodeType(82a242a19623f75).(reader) == XML_READER_TYPE_ELEMENTcxx . . $ XML_READER_TYPE_ELEMENT.) { |
| 611 | |
| 612 | // we are on "<generator>" element, let's alloc structure |
| 613 | ret = cpe_generator_newcxx . . $ cpe_generator_new(f927dc516746c56).(); |
| 614 | if (ret == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 615 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 616 | |
| 617 | // skip nodes until new element |
| 618 | xmlTextReaderNextElementcxx . . $ xmlTextReaderNextElement(82a242a19623f75).(reader); |
| 619 | |
| 620 | while (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_GENERATOR_STRcxx . . $ `src/CPE/cpedict_priv.c:243:9`!) != 0) { |
| 621 | |
| 622 | if ((xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), |
| 623 | TAG_PRODUCT_NAME_STRcxx . . $ `src/CPE/cpedict_priv.c:245:9`!) == 0) && |
| 624 | (xmlTextReaderNodeTypecxx . . $ xmlTextReaderNodeType(82a242a19623f75).(reader) == XML_READER_TYPE_ELEMENTcxx . . $ XML_READER_TYPE_ELEMENT.)) { |
| 625 | ret->product_namecxx . . $ cpe_generator#product_name. = oscap_element_string_copycxx . . $ oscap_element_string_copy(93c99f8009311dd0).(reader); |
| 626 | } else |
| 627 | if ((xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), |
| 628 | TAG_PRODUCT_VERSION_STRcxx . . $ `src/CPE/cpedict_priv.c:246:9`!) == 0) && |
| 629 | (xmlTextReaderNodeTypecxx . . $ xmlTextReaderNodeType(82a242a19623f75).(reader) == XML_READER_TYPE_ELEMENTcxx . . $ XML_READER_TYPE_ELEMENT.)) { |
| 630 | ret->product_versioncxx . . $ cpe_generator#product_version. = oscap_element_string_copycxx . . $ oscap_element_string_copy(93c99f8009311dd0).(reader); |
| 631 | } else |
| 632 | if ((xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), |
| 633 | TAG_SCHEMA_VERSION_STRcxx . . $ `src/CPE/cpedict_priv.c:247:9`!) == 0) && |
| 634 | (xmlTextReaderNodeTypecxx . . $ xmlTextReaderNodeType(82a242a19623f75).(reader) == XML_READER_TYPE_ELEMENTcxx . . $ XML_READER_TYPE_ELEMENT.)) { |
| 635 | ret->schema_versioncxx . . $ cpe_generator#schema_version. = oscap_element_string_copycxx . . $ oscap_element_string_copy(93c99f8009311dd0).(reader); |
| 636 | cpe_parser_ctx_set_schema_versioncxx . . $ cpe_parser_ctx_set_schema_version(25289f94b35fa287).(ctx, ret->schema_versioncxx . . $ cpe_generator#schema_version.); |
| 637 | } else |
| 638 | if ((xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), |
| 639 | TAG_TIMESTAMP_STRcxx . . $ `src/CPE/cpedict_priv.c:248:9`!) == 0) && |
| 640 | (xmlTextReaderNodeTypecxx . . $ xmlTextReaderNodeType(82a242a19623f75).(reader) == XML_READER_TYPE_ELEMENTcxx . . $ XML_READER_TYPE_ELEMENT.)) { |
| 641 | ret->timestampcxx . . $ cpe_generator#timestamp. = oscap_element_string_copycxx . . $ oscap_element_string_copy(93c99f8009311dd0).(reader); |
| 642 | } else if (xmlTextReaderNodeTypecxx . . $ xmlTextReaderNodeType(82a242a19623f75).(reader) == XML_READER_TYPE_ELEMENTcxx . . $ XML_READER_TYPE_ELEMENT.) { |
| 643 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, |
| 644 | "Unknown XML element in CPE dictionary generator, local name is '%s'.", |
| 645 | xmlTextReaderConstLocalName(reader)); |
| 646 | } |
| 647 | // element saved. Let's jump on the very next one node (not element, because we need to |
| 648 | // find XML_READER_TYPE_END_ELEMENT node, see "while" condition and the condition below "while" |
| 649 | xmlTextReaderNextNodecxx . . $ xmlTextReaderNextNode(82a242a19623f75).(reader); |
| 650 | |
| 651 | } |
| 652 | } |
| 653 | |
| 654 | return ret; |
| 655 | |
| 656 | } |
| 657 | |
| 658 | struct cpe_itemcxx . . $ cpe_item# *cpe_item_parsecxx . . $ cpe_item_parse(39ba1f7d39abb029).(struct cpe_parser_ctxcxx . . $ cpe_parser_ctx# *ctx) |
| 659 | { |
| 660 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(ctx); |
| 661 | xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader = cpe_parser_ctx_get_readercxx . . $ cpe_parser_ctx_get_reader(85a830d77083ba03).(ctx); |
| 662 | |
| 663 | struct cpe_itemcxx . . $ cpe_item# *ret = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 664 | struct cpe_checkcxx . . $ cpe_check# *check = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 665 | struct cpe_referencecxx . . $ cpe_reference# *ref = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 666 | char *data; |
| 667 | |
| 668 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(reader); |
| 669 | if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_CPE_ITEM_STRcxx . . $ `src/CPE/cpedict_priv.c:237:9`!) != 0 || |
| 670 | xmlTextReaderNodeTypecxx . . $ xmlTextReaderNodeType(82a242a19623f75).(reader) != XML_READER_TYPE_ELEMENTcxx . . $ XML_READER_TYPE_ELEMENT.) { |
| 671 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, "Found '%s'(%d) node when expecting: '%s'(%d)!", |
| 672 | xmlTextReaderConstLocalName(reader), xmlTextReaderNodeType(reader), |
| 673 | TAG_CPE_ITEM_STRcxx . . $ `src/CPE/cpedict_priv.c:237:9`!, XML_READER_TYPE_ELEMENT); |
| 674 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 675 | } |
| 676 | else { |
| 677 | // we are on "<cpe-item>" element, let's alloc structure |
| 678 | ret = cpe_item_newcxx . . $ cpe_item_new(5d3974f100c54e7f).(); |
| 679 | if (ret == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 680 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 681 | |
| 682 | // Get a name attribute of cpe-item |
| 683 | data = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_NAME_STRcxx . . $ `src/CPE/cpedict_priv.c:241:9`!); |
| 684 | if (data != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 685 | ret->namecxx . . $ cpe_item#name. = cpe_name_newcxx . . $ cpe_name_new(dfbdfc9fcef857b).(data); |
| 686 | freecxx . . $ free(5d22bdacc48458e8).(data); |
| 687 | |
| 688 | // if there is "deprecated", "deprecated_by" and "deprecation_date" in cpe-item element |
| 689 | // ************************************************************************************ |
| 690 | data = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_DEPRECATED_STRcxx . . $ `src/CPE/cpedict_priv.c:240:9`!); |
| 691 | if (data != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { // we have a deprecation here ! |
| 692 | ret->deprecatedcxx . . $ cpe_item#deprecated. = oscap_string_to_enumcxx . . $ oscap_string_to_enum(851d6ce10579b7d8).(OSCAP_BOOL_MAPcxx . . $ OSCAP_BOOL_MAP., data); |
| 693 | ret->exportcxx . . $ cpe_item#export..deprecatedcxx . . $ cpe_item#$anonymous_type_0#deprecated. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 694 | freecxx . . $ free(5d22bdacc48458e8).(data); |
| 695 | } |
| 696 | data = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_DEPRECATED_BY_STRcxx . . $ `src/CPE/cpedict_priv.c:239:9`!); |
| 697 | if (data != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 698 | if ((ret->deprecated_bycxx . . $ cpe_item#deprecated_by. = cpe_name_newcxx . . $ cpe_name_new(dfbdfc9fcef857b).(data)) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 699 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, "Failed to initialize CPE name with '%s'", data); |
| 700 | freecxx . . $ free(5d22bdacc48458e8).(data); |
| 701 | freecxx . . $ free(5d22bdacc48458e8).(ret); |
| 702 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 703 | } |
| 704 | } |
| 705 | freecxx . . $ free(5d22bdacc48458e8).(data); |
| 706 | |
| 707 | data = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_DEPRECATION_DATE_STRcxx . . $ `src/CPE/cpedict_priv.c:238:9`!); |
| 708 | ret->deprecation_datecxx . . $ cpe_item#deprecation_date. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(data); |
| 709 | freecxx . . $ free(5d22bdacc48458e8).(data); |
| 710 | // ************************************************************************************ |
| 711 | |
| 712 | xmlTextReaderNextElementWEcxx . . $ xmlTextReaderNextElementWE(3030c74046fb4b82).(reader, TAG_CPE_ITEM_STRcxx . . $ `src/CPE/cpedict_priv.c:237:9`!); |
| 713 | // Now it's time to go deaply to cpe-item element and parse it's children |
| 714 | // Do while there is another cpe-item element. Then return. |
| 715 | while (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_CPE_ITEM_STRcxx . . $ `src/CPE/cpedict_priv.c:237:9`!) != 0) { |
| 716 | |
| 717 | if (xmlTextReaderNodeTypecxx . . $ xmlTextReaderNodeType(82a242a19623f75).(reader) != XML_READER_TYPE_ELEMENTcxx . . $ XML_READER_TYPE_ELEMENT.) { |
| 718 | xmlTextReaderNextNodecxx . . $ xmlTextReaderNextNode(82a242a19623f75).(reader); |
| 719 | continue; |
| 720 | } |
| 721 | |
| 722 | if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_TITLE_STRcxx . . $ `src/CPE/cpedict_priv.c:236:9`!) == 0) { |
| 723 | oscap_list_addcxx . . $ oscap_list_add(97f28760a5cf7823).(ret->titlescxx . . $ cpe_item#titles., oscap_text_new_parsecxx . . $ oscap_text_new_parse(fc91cb6a8c9d272a).(OSCAP_TEXT_TRAITS_PLAINcxx . . $ OSCAP_TEXT_TRAITS_PLAIN., reader)); |
| 724 | } else if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_NOTES_STRcxx . . $ `src/CPE/cpedict_priv.c:227:9`!) == 0) { |
| 725 | struct cpe_notescxx . . $ cpe_notes# *notes = cpe_notes_parsecxx . . $ cpe_notes_parse(f06dd0d7906747bc).(reader); |
| 726 | if (notes != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 727 | oscap_list_addcxx . . $ oscap_list_add(97f28760a5cf7823).(ret->notescxx . . $ cpe_item#notes., notes); |
| 728 | } else if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_CHECK_STRcxx . . $ `src/CPE/cpedict_priv.c:226:9`!) == 0) { |
| 729 | check = cpe_check_parsecxx . . $ cpe_check_parse(9eac20fa79478bd7).(reader); |
| 730 | if (check) |
| 731 | oscap_list_addcxx . . $ oscap_list_add(97f28760a5cf7823).(ret->checkscxx . . $ cpe_item#checks., check); |
| 732 | } else if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_REFERENCE_STRcxx . . $ `src/CPE/cpedict_priv.c:234:9`!) == 0) { |
| 733 | ref = cpe_reference_parsecxx . . $ cpe_reference_parse(aec5a6ea585a2236).(reader); |
| 734 | if (ref) |
| 735 | oscap_list_addcxx . . $ oscap_list_add(97f28760a5cf7823).(ret->referencescxx . . $ cpe_item#references., ref); |
| 736 | } else if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_ITEM_METADATA_STRcxx . . $ `src/CPE/cpedict_priv.c:233:9`!) == 0) { |
| 737 | data = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_MODIFICATION_DATE_STRcxx . . $ `src/CPE/cpedict_priv.c:232:9`!); |
| 738 | if ((data == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) || ((ret->metadatacxx . . $ cpe_item#metadata. = cpe_item_metadata_newcxx . . $ cpe_item_metadata_new(7301cca23032b45a).()) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) { |
| 739 | if (ret->namecxx . . $ cpe_item#name. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 740 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, |
| 741 | "Failed to parse item-metadata element within cpe-item/@name='%s'", |
| 742 | cpe_name_get_as_str(ret->name)); |
| 743 | } else { |
| 744 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, |
| 745 | "Failed to parse item-metadata element within cpe-item"); |
| 746 | } |
| 747 | cpe_item_freecxx . . $ cpe_item_free(932b5cee17544225).(ret); |
| 748 | freecxx . . $ free(5d22bdacc48458e8).(data); |
| 749 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 750 | } |
| 751 | ret->metadatacxx . . $ cpe_item#metadata.->modification_datecxx . . $ cpe_item_metadata#modification_date. = data; |
| 752 | |
| 753 | data = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_STATUS_STRcxx . . $ `src/CPE/cpedict_priv.c:231:9`!); |
| 754 | if (data) |
| 755 | ret->metadatacxx . . $ cpe_item#metadata.->statuscxx . . $ cpe_item_metadata#status. = data; |
| 756 | data = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_NVD_ID_STRcxx . . $ `src/CPE/cpedict_priv.c:230:9`!); |
| 757 | if (data) |
| 758 | ret->metadatacxx . . $ cpe_item#metadata.->nvd_idcxx . . $ cpe_item_metadata#nvd_id. = (char *)data; |
| 759 | data = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_DEP_BY_NVDID_STRcxx . . $ `src/CPE/cpedict_priv.c:229:9`!); |
| 760 | if (data) |
| 761 | ret->metadatacxx . . $ cpe_item#metadata.->deprecated_by_nvd_idcxx . . $ cpe_item_metadata#deprecated_by_nvd_id. = (char *)data; |
| 762 | else |
| 763 | ret->metadatacxx . . $ cpe_item#metadata.->deprecated_by_nvd_idcxx . . $ cpe_item_metadata#deprecated_by_nvd_id. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 764 | data = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 765 | |
| 766 | } else |
| 767 | if ((xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), |
| 768 | TAG_REFERENCES_STRcxx . . $ `src/CPE/cpedict_priv.c:228:9`!) == 0)) { |
| 769 | // we just need to jump over this element |
| 770 | } else if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! TAG_CPE23_ITEM_STRcxx . . $ `src/CPE/cpedict_ext_priv.h:33:9`!) == 0) { |
| 771 | if ((ret->cpe23_itemcxx . . $ cpe_item#cpe23_item. = cpe23_item_parsecxx . . $ cpe23_item_parse(28941171ca6229ef).(reader)) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 772 | cpe_item_freecxx . . $ cpe_item_free(932b5cee17544225).(ret); |
| 773 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 774 | } |
| 775 | } else { |
| 776 | return ret; // <-- we need to return here, because we don't want to jump to next element |
| 777 | } |
| 778 | xmlTextReaderNextElementWEcxx . . $ xmlTextReaderNextElementWE(3030c74046fb4b82).(reader, TAG_CPE_ITEM_STRcxx . . $ `src/CPE/cpedict_priv.c:237:9`!); |
| 779 | } |
| 780 | } |
| 781 | |
| 782 | return ret; |
| 783 | } |
| 784 | |
| 785 | static struct cpe_checkcxx . . $ cpe_check# *cpe_check_parsecxx . . $ cpe_check_parse(9eac20fa79478bd7).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader) |
| 786 | { |
| 787 | |
| 788 | struct cpe_checkcxx . . $ cpe_check# *ret; |
| 789 | |
| 790 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(reader); |
| 791 | |
| 792 | if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_CHECK_STRcxx . . $ `src/CPE/cpedict_priv.c:226:9`!) != 0) |
| 793 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 794 | |
| 795 | if ((ret = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_checkcxx . . $ cpe_check#))) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 796 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 797 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(ret, 0, sizeof(struct cpe_checkcxx . . $ cpe_check#)); |
| 798 | |
| 799 | ret->systemcxx . . $ cpe_check#system. = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_SYSTEM_STRcxx . . $ `src/CPE/cpedict_priv.c:258:9`!); |
| 800 | ret->hrefcxx . . $ cpe_check#href. = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_HREF_STRcxx . . $ `src/CPE/cpedict_priv.c:259:9`!); |
| 801 | ret->identifiercxx . . $ cpe_check#identifier. = oscap_trimcxx . . $ oscap_trim(7a9722d75b371431).(oscap_element_string_copycxx . . $ oscap_element_string_copy(93c99f8009311dd0).(reader)); |
| 802 | |
| 803 | return ret; |
| 804 | } |
| 805 | |
| 806 | static struct cpe_referencecxx . . $ cpe_reference# *cpe_reference_parsecxx . . $ cpe_reference_parse(aec5a6ea585a2236).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader) |
| 807 | { |
| 808 | |
| 809 | struct cpe_referencecxx . . $ cpe_reference# *ret; |
| 810 | |
| 811 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(reader); |
| 812 | |
| 813 | if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_REFERENCE_STRcxx . . $ `src/CPE/cpedict_priv.c:234:9`!) != 0) |
| 814 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 815 | |
| 816 | if ((ret = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(struct cpe_referencecxx . . $ cpe_reference#))) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 817 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 818 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(ret, 0, sizeof(struct cpe_referencecxx . . $ cpe_reference#)); |
| 819 | |
| 820 | ret->hrefcxx . . $ cpe_reference#href. = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_HREF_STRcxx . . $ `src/CPE/cpedict_priv.c:259:9`!); |
| 821 | ret->contentcxx . . $ cpe_reference#content. = oscap_trimcxx . . $ oscap_trim(7a9722d75b371431).(oscap_element_string_copycxx . . $ oscap_element_string_copy(93c99f8009311dd0).(reader)); |
| 822 | |
| 823 | return ret; |
| 824 | } |
| 825 | |
| 826 | static struct cpe_notescxx . . $ cpe_notes# *cpe_notes_parsecxx . . $ cpe_notes_parse(f06dd0d7906747bc).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader) |
| 827 | { |
| 828 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(reader); |
| 829 | |
| 830 | if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_NOTES_STRcxx . . $ `src/CPE/cpedict_priv.c:227:9`!) != 0) { |
| 831 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, "Found '%s' node when expecting: '%s'!", |
| 832 | xmlTextReaderConstLocalName(reader), TAG_NOTES_STRcxx . . $ `src/CPE/cpedict_priv.c:227:9`!); |
| 833 | } |
| 834 | |
| 835 | struct cpe_notescxx . . $ cpe_notes# *notes = cpe_notes_newcxx . . $ cpe_notes_new(e6920f0093c664ee).(); |
| 836 | notes->langcxx . . $ cpe_notes#lang. = (char *) xmlTextReaderXmlLangcxx . . $ xmlTextReaderXmlLang(3322afb275581432).(reader); |
| 837 | if (xmlTextReaderIsEmptyElementcxx . . $ xmlTextReaderIsEmptyElement(82a242a19623f75).(reader) == 0) { // element contains child nodes |
| 838 | xmlTextReaderNextNodecxx . . $ xmlTextReaderNextNode(82a242a19623f75).(reader); |
| 839 | while (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_NOTES_STRcxx . . $ `src/CPE/cpedict_priv.c:227:9`!) != 0) { |
| 840 | if (xmlTextReaderNodeTypecxx . . $ xmlTextReaderNodeType(82a242a19623f75).(reader) != XML_READER_TYPE_ELEMENTcxx . . $ XML_READER_TYPE_ELEMENT.) { |
| 841 | xmlTextReaderNextNodecxx . . $ xmlTextReaderNextNode(82a242a19623f75).(reader); |
| 842 | continue; |
| 843 | } |
| 844 | |
| 845 | if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_NOTE_STRcxx . . $ `src/CPE/cpedict_priv.c:235:9`!) == 0) { |
| 846 | char *note_text = oscap_element_string_copycxx . . $ oscap_element_string_copy(93c99f8009311dd0).(reader); |
| 847 | oscap_list_addcxx . . $ oscap_list_add(97f28760a5cf7823).(notes->notescxx . . $ cpe_notes#notes., note_text); |
| 848 | } else { |
| 849 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, "Unexpected element within notes element: '%s'", |
| 850 | xmlTextReaderConstLocalName(reader)); |
| 851 | cpe_notes_freecxx . . $ cpe_notes_free(628608e694f68eda).(notes); |
| 852 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 853 | } |
| 854 | xmlTextReaderNextNodecxx . . $ xmlTextReaderNextNode(82a242a19623f75).(reader); |
| 855 | } |
| 856 | } |
| 857 | |
| 858 | return notes; |
| 859 | } |
| 860 | |
| 861 | struct cpe_vendorcxx . . $ cpe_vendor# *cpe_vendor_parsecxx . . $ cpe_vendor_parse(869b5aacb6b94023).(xmlTextReaderPtrcxx . . $ xmlTextReaderPtr# reader) |
| 862 | { |
| 863 | |
| 864 | struct cpe_vendorcxx . . $ cpe_vendor# *ret = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 865 | struct cpe_productcxx . . $ cpe_product# *product = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 866 | struct cpe_versioncxx . . $ cpe_version# *version = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 867 | struct cpe_updatecxx . . $ cpe_update# *update = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 868 | struct cpe_editioncxx . . $ cpe_edition# *edition = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 869 | struct cpe_languagecxx . . $ cpe_language# *language = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 870 | char *data; |
| 871 | |
| 872 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(reader); |
| 873 | |
| 874 | if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_VENDOR_STRcxx . . $ `src/CPE/cpedict_priv.c:250:9`!) != 0) |
| 875 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 876 | |
| 877 | ret = cpe_vendor_newcxx . . $ cpe_vendor_new(ada4bafd0a6f5c95).(); |
| 878 | if (ret == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 879 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 880 | |
| 881 | ret->valuecxx . . $ cpe_vendor#value. = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_VALUE_STRcxx . . $ `src/CPE/cpedict_priv.c:256:9`!); |
| 882 | // jump to next element (which should be product) |
| 883 | xmlTextReaderNextElementcxx . . $ xmlTextReaderNextElement(82a242a19623f75).(reader); |
| 884 | |
| 885 | while (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_VENDOR_STRcxx . . $ `src/CPE/cpedict_priv.c:250:9`!) != 0) { |
| 886 | |
| 887 | if (xmlTextReaderNodeTypecxx . . $ xmlTextReaderNodeType(82a242a19623f75).(reader) != XML_READER_TYPE_ELEMENTcxx . . $ XML_READER_TYPE_ELEMENT.) { |
| 888 | xmlTextReaderNextNodecxx . . $ xmlTextReaderNextNode(82a242a19623f75).(reader); |
| 889 | continue; |
| 890 | } |
| 891 | |
| 892 | if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_TITLE_STRcxx . . $ `src/CPE/cpedict_priv.c:236:9`!) == 0) { |
| 893 | oscap_list_addcxx . . $ oscap_list_add(97f28760a5cf7823).(ret->titlescxx . . $ cpe_vendor#titles., oscap_text_new_parsecxx . . $ oscap_text_new_parse(fc91cb6a8c9d272a).(OSCAP_TEXT_TRAITS_PLAINcxx . . $ OSCAP_TEXT_TRAITS_PLAIN., reader)); |
| 894 | } else if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_PRODUCT_STRcxx . . $ `src/CPE/cpedict_priv.c:244:9`!) == 0) { |
| 895 | // initialization |
| 896 | product = cpe_product_newcxx . . $ cpe_product_new(db9e708c6560c5a0).(); |
| 897 | |
| 898 | if (product) { |
| 899 | product->valuecxx . . $ cpe_product#value. = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_VALUE_STRcxx . . $ `src/CPE/cpedict_priv.c:256:9`!); |
| 900 | |
| 901 | data = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_PART_STRcxx . . $ `src/CPE/cpedict_priv.c:257:9`!); |
| 902 | if (data) { |
| 903 | if (oscap_strcasecmpcxx . . $ oscap_strcasecmp(5ae29d726ae57f88).((const char *)data, "h") == 0) |
| 904 | product->partcxx . . $ cpe_product#part. = CPE_PART_HWcxx . . $ CPE_PART_HW.; |
| 905 | else if (oscap_strcasecmpcxx . . $ oscap_strcasecmp(5ae29d726ae57f88).((const char *)data, "o") == 0) |
| 906 | product->partcxx . . $ cpe_product#part. = CPE_PART_OScxx . . $ CPE_PART_OS.; |
| 907 | else if (oscap_strcasecmpcxx . . $ oscap_strcasecmp(5ae29d726ae57f88).((const char *)data, "a") == 0) |
| 908 | product->partcxx . . $ cpe_product#part. = CPE_PART_APPcxx . . $ CPE_PART_APP.; |
| 909 | else { |
| 910 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, "Unknown attribute value of vendor/@part='%s'", data); |
| 911 | freecxx . . $ free(5d22bdacc48458e8).(ret); |
| 912 | freecxx . . $ free(5d22bdacc48458e8).(data); |
| 913 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 914 | } |
| 915 | } else { |
| 916 | product->partcxx . . $ cpe_product#part. = CPE_PART_NONEcxx . . $ CPE_PART_NONE.; |
| 917 | } |
| 918 | freecxx . . $ free(5d22bdacc48458e8).(data); |
| 919 | oscap_list_addcxx . . $ oscap_list_add(97f28760a5cf7823).(ret->productscxx . . $ cpe_vendor#products., product); |
| 920 | } |
| 921 | } else if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_VERSION_STRcxx . . $ `src/CPE/cpedict_priv.c:252:9`!) == 0) { |
| 922 | // initialization |
| 923 | version = cpe_version_newcxx . . $ cpe_version_new(2ebd60e31b9338a9).(); |
| 924 | version->valuecxx . . $ cpe_version#value. = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_VALUE_STRcxx . . $ `src/CPE/cpedict_priv.c:256:9`!); |
| 925 | oscap_list_addcxx . . $ oscap_list_add(97f28760a5cf7823).(product->versionscxx . . $ cpe_product#versions., version); |
| 926 | } else if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_UPDATE_STRcxx . . $ `src/CPE/cpedict_priv.c:253:9`!) == 0) { |
| 927 | // initialization |
| 928 | update = cpe_update_newcxx . . $ cpe_update_new(1687917a96d38ef6).(); |
| 929 | update->valuecxx . . $ cpe_update#value. = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_VALUE_STRcxx . . $ `src/CPE/cpedict_priv.c:256:9`!); |
| 930 | oscap_list_addcxx . . $ oscap_list_add(97f28760a5cf7823).(version->updatescxx . . $ cpe_version#updates., update); |
| 931 | } else if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_EDITION_STRcxx . . $ `src/CPE/cpedict_priv.c:254:9`!) == 0) { |
| 932 | // initialization |
| 933 | edition = cpe_edition_newcxx . . $ cpe_edition_new(81355ef26abe0244).(); |
| 934 | edition->valuecxx . . $ cpe_edition#value. = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_VALUE_STRcxx . . $ `src/CPE/cpedict_priv.c:256:9`!); |
| 935 | oscap_list_addcxx . . $ oscap_list_add(97f28760a5cf7823).(update->editionscxx . . $ cpe_update#editions., edition); |
| 936 | } else if (xmlStrcmpcxx . . $ xmlStrcmp(e46526da1a64e2fc).(xmlTextReaderConstLocalNamecxx . . $ xmlTextReaderConstLocalName(60a5affeeceb06fd).(reader), TAG_LANGUAGE_STRcxx . . $ `src/CPE/cpedict_priv.c:255:9`!) == 0) { |
| 937 | // initialization |
| 938 | language = cpe_language_newcxx . . $ cpe_language_new(a44a94a5e2bf97b2).(); |
| 939 | language->valuecxx . . $ cpe_language#value. = (char *)xmlTextReaderGetAttributecxx . . $ xmlTextReaderGetAttribute(6d056300a6ef2116).(reader, ATTR_VALUE_STRcxx . . $ `src/CPE/cpedict_priv.c:256:9`!); |
| 940 | oscap_list_addcxx . . $ oscap_list_add(97f28760a5cf7823).(edition->languagescxx . . $ cpe_edition#languages., language); |
| 941 | } else { |
| 942 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, "Unknown XML element withinin CPE vendor element, local name is '%s'.", |
| 943 | xmlTextReaderConstLocalName(reader)); |
| 944 | } |
| 945 | xmlTextReaderNextNodecxx . . $ xmlTextReaderNextNode(82a242a19623f75).(reader); |
| 946 | } |
| 947 | return ret; |
| 948 | |
| 949 | } |
| 950 | |
| 951 | /* End of private parsing functions |
| 952 | * */ |
| 953 | /***************************************************************************/ |
| 954 | |
| 955 | /***************************************************************************/ |
| 956 | /* Private exporting functions cpe_*<structure>*_export( xmlTextWriterPtr ) |
| 957 | * More info in representive header file. |
| 958 | * returns the type of <structure> |
| 959 | */ |
| 960 | void cpe_dict_model_export_xmlcxx . . $ cpe_dict_model_export_xml(8b983929fdf096f8).(const struct cpe_dict_modelcxx . . $ cpe_dict_model# *dict, const char *file) |
| 961 | { |
| 962 | |
| 963 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(dict); |
| 964 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(file); |
| 965 | |
| 966 | // TODO: add macro to check return value from xmlTextWriter* functions |
| 967 | xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer; |
| 968 | |
| 969 | writer = xmlNewTextWriterFilenamecxx . . $ xmlNewTextWriterFilename(b7d9f8c21eb775fc).(file, 0); |
| 970 | if (writer == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 971 | oscap_setxmlerrcxx . . $ `src/common/_error.h:36:9`!(xmlGetLastError()); |
| 972 | return; |
| 973 | } |
| 974 | |
| 975 | xmlTextWriterSetIndentcxx . . $ xmlTextWriterSetIndent(40cd80302c2e8c8f).(writer, 1); |
| 976 | xmlTextWriterSetIndentStringcxx . . $ xmlTextWriterSetIndentString(bf445c147f693955).(writer, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! " "); |
| 977 | |
| 978 | xmlTextWriterStartDocumentcxx . . $ xmlTextWriterStartDocument(c81398d07282c425).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, "UTF-8", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 979 | |
| 980 | cpe_dict_exportcxx . . $ cpe_dict_export(4b5b08d0da02f342).(dict, writer); |
| 981 | xmlTextWriterEndDocumentcxx . . $ xmlTextWriterEndDocument(7e81f973a4eb6684).(writer); |
| 982 | xmlFreeTextWritercxx . . $ xmlFreeTextWriter(30c71198a738ce89).(writer); |
| 983 | if (xmlGetLastErrorcxx . . $ xmlGetLastError(8a16e63d0dea4f48).() != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 984 | oscap_setxmlerrcxx . . $ `src/common/_error.h:36:9`!(xmlGetLastError()); |
| 985 | } |
| 986 | |
| 987 | void cpe_dict_exportcxx . . $ cpe_dict_export(4b5b08d0da02f342).(const struct cpe_dict_modelcxx . . $ cpe_dict_model# *dict, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer) |
| 988 | { |
| 989 | |
| 990 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(dict); |
| 991 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(writer); |
| 992 | |
| 993 | const int base_version = cpe_dict_model_get_base_versioncxx . . $ cpe_dict_model_get_base_version(bb6a3e6968080cda).(dict); |
| 994 | |
| 995 | switch (base_version) { |
| 996 | case 1: |
| 997 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_CPE_LIST_STRcxx . . $ `src/CPE/cpedict_priv.c:251:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! XMLNS_CPE1Dcxx . . $ `src/common/xmlns_priv.h:32:9`!); |
| 998 | break; |
| 999 | case 2: |
| 1000 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_CPE_LIST_STRcxx . . $ `src/CPE/cpedict_priv.c:251:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! XMLNS_CPE2Dcxx . . $ `src/common/xmlns_priv.h:34:9`!); |
| 1001 | break; |
| 1002 | default: |
| 1003 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, "Unknown CPE base version '%i'.", base_version); |
| 1004 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_CPE_LIST_STRcxx . . $ `src/CPE/cpedict_priv.c:251:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "http://open-scap.org/CPE/unknown"); |
| 1005 | break; |
| 1006 | } |
| 1007 | |
| 1008 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "xmlns:meta", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! XMLNS_CPE2D_METADATAcxx . . $ `src/common/xmlns_priv.h:36:9`!); |
| 1009 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "xmlns:xsi", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "http://www.w3.org/2001/XMLSchema-instance"); |
| 1010 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "xsi:schemaLocation", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! |
| 1011 | XMLNS_CPE2D_METADATAcxx . . $ `src/common/xmlns_priv.h:36:9`! " http://nvd.nist.gov/schema/cpe-dictionary-metadata_0.2.xsd " |
| 1012 | XMLNS_CPE2Dcxx . . $ `src/common/xmlns_priv.h:34:9`! " http://cpe.mitre.org/files/cpe-dictionary_2.1.xsd"); |
| 1013 | |
| 1014 | if (dict->generatorcxx . . $ cpe_dict_model#generator.) cpe_generator_exportcxx . . $ cpe_generator_export(edb600c2de36990).(dict->generatorcxx . . $ cpe_dict_model#generator., writer); |
| 1015 | OSCAP_FOREACHcxx . . $ `src/common/list.h:128:9`!(cpe_item, item, cpe_dict_model_get_items(dict), |
| 1016 | // dump its contents to XML tree |
| 1017 | cpe_item_export(item, writer, base_version);) |
| 1018 | |
| 1019 | if (base_version >= 2) { |
| 1020 | // TODO: NEED TO HAVE COMPONENT-TREE STRUCTURE TO GET XML-NAMESPACE |
| 1021 | if (oscap_list_get_itemcountcxx . . $ oscap_list_get_itemcount(5b766af325364e37).(dict->vendorscxx . . $ cpe_dict_model#vendors.) != 0) { |
| 1022 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_COMPONENT_TREE_STRcxx . . $ `src/CPE/cpedict_priv.c:249:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! XMLNS_CPE2D_METADATAcxx . . $ `src/common/xmlns_priv.h:36:9`!); |
| 1023 | OSCAP_FOREACHcxx . . $ `src/common/list.h:128:9`!(cpe_vendor, vendor, cpe_dict_model_get_vendors(dict), cpe_vendor_export(vendor, writer);) |
| 1024 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); //</component-tree> |
| 1025 | } |
| 1026 | } |
| 1027 | |
| 1028 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1029 | if (xmlGetLastErrorcxx . . $ xmlGetLastError(8a16e63d0dea4f48).() != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1030 | oscap_setxmlerrcxx . . $ `src/common/_error.h:36:9`!(xmlGetLastError()); |
| 1031 | } |
| 1032 | |
| 1033 | void cpe_generator_exportcxx . . $ cpe_generator_export(edb600c2de36990).(const struct cpe_generatorcxx . . $ cpe_generator# *generator, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer) |
| 1034 | { |
| 1035 | |
| 1036 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(generator); |
| 1037 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(writer); |
| 1038 | |
| 1039 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_GENERATOR_STRcxx . . $ `src/CPE/cpedict_priv.c:243:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1040 | if (generator->product_namecxx . . $ cpe_generator#product_name. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1041 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_PRODUCT_NAME_STRcxx . . $ `src/CPE/cpedict_priv.c:245:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1042 | xmlTextWriterWriteStringcxx . . $ xmlTextWriterWriteString(bf445c147f693955).(writer, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! generator->product_namecxx . . $ cpe_generator#product_name.); |
| 1043 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1044 | } |
| 1045 | if (generator->product_versioncxx . . $ cpe_generator#product_version. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1046 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_PRODUCT_VERSION_STRcxx . . $ `src/CPE/cpedict_priv.c:246:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1047 | xmlTextWriterWriteStringcxx . . $ xmlTextWriterWriteString(bf445c147f693955).(writer, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! generator->product_versioncxx . . $ cpe_generator#product_version.); |
| 1048 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1049 | } |
| 1050 | if (generator->schema_versioncxx . . $ cpe_generator#schema_version. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1051 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_SCHEMA_VERSION_STRcxx . . $ `src/CPE/cpedict_priv.c:247:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1052 | xmlTextWriterWriteStringcxx . . $ xmlTextWriterWriteString(bf445c147f693955).(writer, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! generator->schema_versioncxx . . $ cpe_generator#schema_version.); |
| 1053 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1054 | } |
| 1055 | if (generator->timestampcxx . . $ cpe_generator#timestamp. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1056 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_TIMESTAMP_STRcxx . . $ `src/CPE/cpedict_priv.c:248:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1057 | xmlTextWriterWriteStringcxx . . $ xmlTextWriterWriteString(bf445c147f693955).(writer, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! generator->timestampcxx . . $ cpe_generator#timestamp.); |
| 1058 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1059 | } |
| 1060 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); //</gnerator> |
| 1061 | if (xmlGetLastErrorcxx . . $ xmlGetLastError(8a16e63d0dea4f48).() != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1062 | oscap_setxmlerrcxx . . $ `src/common/_error.h:36:9`!(xmlGetLastError()); |
| 1063 | |
| 1064 | } |
| 1065 | |
| 1066 | void cpe_item_exportcxx . . $ cpe_item_export(7e62b63abb340dcd).(const struct cpe_itemcxx . . $ cpe_item# *item, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer, int base_version) |
| 1067 | { |
| 1068 | |
| 1069 | char *temp; |
| 1070 | struct oscap_iteratorcxx . . $ oscap_iterator# *it; |
| 1071 | |
| 1072 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(item); |
| 1073 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(writer); |
| 1074 | |
| 1075 | switch (base_version) { |
| 1076 | case 1: |
| 1077 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_CPE_ITEM_STRcxx . . $ `src/CPE/cpedict_priv.c:237:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! XMLNS_CPE1Dcxx . . $ `src/common/xmlns_priv.h:32:9`!); |
| 1078 | break; |
| 1079 | case 2: |
| 1080 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_CPE_ITEM_STRcxx . . $ `src/CPE/cpedict_priv.c:237:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! XMLNS_CPE2Dcxx . . $ `src/common/xmlns_priv.h:34:9`!); |
| 1081 | break; |
| 1082 | default: |
| 1083 | oscap_seterrcxx . . $ `src/common/_error.h:52:9`!(OSCAP_EFAMILY_OSCAPcxx . . $ `src/common/public/oscap_error.h:60:9`!, "Unknown CPE base version '%i'.", base_version); |
| 1084 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_CPE_ITEM_STRcxx . . $ `src/CPE/cpedict_priv.c:237:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "http://open-scap.org/CPE/unknown"); |
| 1085 | break; |
| 1086 | } |
| 1087 | |
| 1088 | if (item->namecxx . . $ cpe_item#name. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1089 | temp = cpe_name_get_as_formatcxx . . $ cpe_name_get_as_format(d944afa77bbd3357).(item->namecxx . . $ cpe_item#name., CPE_FORMAT_URIcxx . . $ CPE_FORMAT_URI.); |
| 1090 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_NAME_STRcxx . . $ `src/CPE/cpedict_priv.c:241:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! temp); |
| 1091 | freecxx . . $ free(5d22bdacc48458e8).(temp); |
| 1092 | } |
| 1093 | if (item->exportcxx . . $ cpe_item#export..deprecatedcxx . . $ cpe_item#$anonymous_type_0#deprecated. == truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!) { |
| 1094 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_DEPRECATED_STRcxx . . $ `src/CPE/cpedict_priv.c:240:9`!, |
| 1095 | BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! oscap_enum_to_stringcxx . . $ oscap_enum_to_string(64165c519d473d40).(OSCAP_BOOL_MAPcxx . . $ OSCAP_BOOL_MAP., item->deprecatedcxx . . $ cpe_item#deprecated.)); |
| 1096 | } |
| 1097 | if (item->deprecated_bycxx . . $ cpe_item#deprecated_by. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1098 | temp = cpe_name_get_as_formatcxx . . $ cpe_name_get_as_format(d944afa77bbd3357).(item->deprecated_bycxx . . $ cpe_item#deprecated_by., CPE_FORMAT_URIcxx . . $ CPE_FORMAT_URI.); |
| 1099 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_DEPRECATED_BY_STRcxx . . $ `src/CPE/cpedict_priv.c:239:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! temp); |
| 1100 | freecxx . . $ free(5d22bdacc48458e8).(temp); |
| 1101 | } |
| 1102 | if (item->deprecation_datecxx . . $ cpe_item#deprecation_date. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1103 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_DEPRECATION_DATE_STRcxx . . $ `src/CPE/cpedict_priv.c:238:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! item->deprecation_datecxx . . $ cpe_item#deprecation_date.); |
| 1104 | } |
| 1105 | |
| 1106 | oscap_textlist_exportcxx . . $ oscap_textlist_export(2181939542e556de).(cpe_item_get_titlescxx . . $ cpe_item_get_titles(5c0ba1dfe0c35092).(item), writer, "title"); |
| 1107 | |
| 1108 | it = oscap_iterator_newcxx . . $ oscap_iterator_new(f89fb456dfd589d7).(item->notescxx . . $ cpe_item#notes.); |
| 1109 | if (oscap_iterator_has_morecxx . . $ oscap_iterator_has_more(63b1de9a5adb9205).(it)) { |
| 1110 | cpe_notes_exportcxx . . $ cpe_notes_export(526db04bd1cd24c1).(oscap_iterator_nextcxx . . $ oscap_iterator_next(4c75051c806960eb).(it), writer); |
| 1111 | } |
| 1112 | |
| 1113 | oscap_iterator_freecxx . . $ oscap_iterator_free(3cba44c1b7872358).(it); |
| 1114 | |
| 1115 | if (item->metadatacxx . . $ cpe_item#metadata. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1116 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NS_META_STRcxx . . $ `src/CPE/cpedict_priv.c:260:9`!, TAG_ITEM_METADATA_STRcxx . . $ `src/CPE/cpedict_priv.c:233:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1117 | if (item->metadatacxx . . $ cpe_item#metadata.->modification_datecxx . . $ cpe_item_metadata#modification_date. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1118 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_MODIFICATION_DATE_STRcxx . . $ `src/CPE/cpedict_priv.c:232:9`!, |
| 1119 | BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! item->metadatacxx . . $ cpe_item#metadata.->modification_datecxx . . $ cpe_item_metadata#modification_date.); |
| 1120 | if (item->metadatacxx . . $ cpe_item#metadata.->statuscxx . . $ cpe_item_metadata#status. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1121 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_STATUS_STRcxx . . $ `src/CPE/cpedict_priv.c:231:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! item->metadatacxx . . $ cpe_item#metadata.->statuscxx . . $ cpe_item_metadata#status.); |
| 1122 | if (item->metadatacxx . . $ cpe_item#metadata.->nvd_idcxx . . $ cpe_item_metadata#nvd_id. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1123 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_NVD_ID_STRcxx . . $ `src/CPE/cpedict_priv.c:230:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! item->metadatacxx . . $ cpe_item#metadata.->nvd_idcxx . . $ cpe_item_metadata#nvd_id.); |
| 1124 | if (item->metadatacxx . . $ cpe_item#metadata.->deprecated_by_nvd_idcxx . . $ cpe_item_metadata#deprecated_by_nvd_id. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1125 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_DEP_BY_NVDID_STRcxx . . $ `src/CPE/cpedict_priv.c:229:9`!, |
| 1126 | BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! item->metadatacxx . . $ cpe_item#metadata.->deprecated_by_nvd_idcxx . . $ cpe_item_metadata#deprecated_by_nvd_id.); |
| 1127 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1128 | } |
| 1129 | |
| 1130 | it = oscap_iterator_newcxx . . $ oscap_iterator_new(f89fb456dfd589d7).(item->referencescxx . . $ cpe_item#references.); |
| 1131 | if (oscap_iterator_has_morecxx . . $ oscap_iterator_has_more(63b1de9a5adb9205).(it)) { |
| 1132 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_REFERENCES_STRcxx . . $ `src/CPE/cpedict_priv.c:228:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1133 | OSCAP_FOREACHcxx . . $ `src/common/list.h:128:9`!(cpe_reference, ref, cpe_item_get_references(item), cpe_reference_export(ref, writer);) |
| 1134 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1135 | } |
| 1136 | oscap_iterator_freecxx . . $ oscap_iterator_free(3cba44c1b7872358).(it); |
| 1137 | |
| 1138 | OSCAP_FOREACHcxx . . $ `src/common/list.h:128:9`!(cpe_check, check, cpe_item_get_checks(item), cpe_check_export(check, writer);) |
| 1139 | if (item->cpe23_itemcxx . . $ cpe_item#cpe23_item. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1140 | cpe23_item_exportcxx . . $ cpe23_item_export(54cb2700ca7e789c).(item->cpe23_itemcxx . . $ cpe_item#cpe23_item., writer); |
| 1141 | } |
| 1142 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1143 | if (xmlGetLastErrorcxx . . $ xmlGetLastError(8a16e63d0dea4f48).() != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1144 | oscap_setxmlerrcxx . . $ `src/common/_error.h:36:9`!(xmlGetLastError()); |
| 1145 | |
| 1146 | } |
| 1147 | |
| 1148 | void cpe_vendor_exportcxx . . $ cpe_vendor_export(22dd32596ffa6c09).(const struct cpe_vendorcxx . . $ cpe_vendor# *vendor, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer) |
| 1149 | { |
| 1150 | |
| 1151 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(vendor); |
| 1152 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(writer); |
| 1153 | |
| 1154 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_VENDOR_STRcxx . . $ `src/CPE/cpedict_priv.c:250:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1155 | if (vendor->valuecxx . . $ cpe_vendor#value. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1156 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_VALUE_STRcxx . . $ `src/CPE/cpedict_priv.c:256:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! vendor->valuecxx . . $ cpe_vendor#value.); |
| 1157 | |
| 1158 | oscap_textlist_exportcxx . . $ oscap_textlist_export(2181939542e556de).(cpe_vendor_get_titlescxx . . $ cpe_vendor_get_titles(eb938a7e1923c7b3).(vendor), writer, "title"); |
| 1159 | |
| 1160 | OSCAP_FOREACHcxx . . $ `src/common/list.h:128:9`!(cpe_product, product, cpe_vendor_get_products(vendor), cpe_product_export(product, writer);) |
| 1161 | |
| 1162 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1163 | if (xmlGetLastErrorcxx . . $ xmlGetLastError(8a16e63d0dea4f48).() != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1164 | oscap_setxmlerrcxx . . $ `src/common/_error.h:36:9`!(xmlGetLastError()); |
| 1165 | } |
| 1166 | |
| 1167 | static void cpe_product_exportcxx . . $ cpe_product_export(3b6b190b85edef77).(const struct cpe_productcxx . . $ cpe_product# *product, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer) |
| 1168 | { |
| 1169 | |
| 1170 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(product); |
| 1171 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(writer); |
| 1172 | |
| 1173 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_PRODUCT_STRcxx . . $ `src/CPE/cpedict_priv.c:244:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1174 | if (product->valuecxx . . $ cpe_product#value. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1175 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_VALUE_STRcxx . . $ `src/CPE/cpedict_priv.c:256:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! product->valuecxx . . $ cpe_product#value.); |
| 1176 | if (product->partcxx . . $ cpe_product#part. != CPE_PART_NONEcxx . . $ CPE_PART_NONE.) |
| 1177 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_PART_STRcxx . . $ `src/CPE/cpedict_priv.c:257:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! PART_TO_CHARcxx . . $ PART_TO_CHAR.[product->partcxx . . $ cpe_product#part.]); |
| 1178 | |
| 1179 | OSCAP_FOREACHcxx . . $ `src/common/list.h:128:9`!(cpe_version, version, cpe_product_get_versions(product), cpe_version_export(version, writer);) |
| 1180 | |
| 1181 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1182 | } |
| 1183 | |
| 1184 | static void cpe_version_exportcxx . . $ cpe_version_export(20aaaef5e0ce5918).(const struct cpe_versioncxx . . $ cpe_version# *version, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer) |
| 1185 | { |
| 1186 | |
| 1187 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(version); |
| 1188 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(writer); |
| 1189 | |
| 1190 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_VERSION_STRcxx . . $ `src/CPE/cpedict_priv.c:252:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1191 | if (version->valuecxx . . $ cpe_version#value. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1192 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_VALUE_STRcxx . . $ `src/CPE/cpedict_priv.c:256:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! version->valuecxx . . $ cpe_version#value.); |
| 1193 | |
| 1194 | OSCAP_FOREACHcxx . . $ `src/common/list.h:128:9`!(cpe_update, update, cpe_version_get_updates(version), cpe_update_export(update, writer);) |
| 1195 | |
| 1196 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1197 | if (xmlGetLastErrorcxx . . $ xmlGetLastError(8a16e63d0dea4f48).() != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1198 | oscap_setxmlerrcxx . . $ `src/common/_error.h:36:9`!(xmlGetLastError()); |
| 1199 | |
| 1200 | } |
| 1201 | |
| 1202 | static void cpe_update_exportcxx . . $ cpe_update_export(69705bf787c0854).(const struct cpe_updatecxx . . $ cpe_update# *update, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer) |
| 1203 | { |
| 1204 | |
| 1205 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(update); |
| 1206 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(writer); |
| 1207 | |
| 1208 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_UPDATE_STRcxx . . $ `src/CPE/cpedict_priv.c:253:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1209 | if (update->valuecxx . . $ cpe_update#value. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1210 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_VALUE_STRcxx . . $ `src/CPE/cpedict_priv.c:256:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! update->valuecxx . . $ cpe_update#value.); |
| 1211 | |
| 1212 | OSCAP_FOREACHcxx . . $ `src/common/list.h:128:9`!(cpe_edition, edition, cpe_update_get_editions(update), cpe_edition_export(edition, writer);) |
| 1213 | |
| 1214 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1215 | } |
| 1216 | |
| 1217 | static void cpe_edition_exportcxx . . $ cpe_edition_export(8872c4dd1933832f).(const struct cpe_editioncxx . . $ cpe_edition# *edition, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer) |
| 1218 | { |
| 1219 | |
| 1220 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(edition); |
| 1221 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(writer); |
| 1222 | |
| 1223 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_EDITION_STRcxx . . $ `src/CPE/cpedict_priv.c:254:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1224 | if (edition->valuecxx . . $ cpe_edition#value. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1225 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_VALUE_STRcxx . . $ `src/CPE/cpedict_priv.c:256:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! edition->valuecxx . . $ cpe_edition#value.); |
| 1226 | |
| 1227 | OSCAP_FOREACHcxx . . $ `src/common/list.h:128:9`!(cpe_language, language, cpe_edition_get_languages(edition), |
| 1228 | cpe_language_export(language, writer);) |
| 1229 | |
| 1230 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1231 | } |
| 1232 | |
| 1233 | static void cpe_language_exportcxx . . $ cpe_language_export(24459941b6a2f1fb).(const struct cpe_languagecxx . . $ cpe_language# *language, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer) |
| 1234 | { |
| 1235 | |
| 1236 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(language); |
| 1237 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(writer); |
| 1238 | |
| 1239 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_LANGUAGE_STRcxx . . $ `src/CPE/cpedict_priv.c:255:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1240 | if (language->valuecxx . . $ cpe_language#value. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1241 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_VALUE_STRcxx . . $ `src/CPE/cpedict_priv.c:256:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! language->valuecxx . . $ cpe_language#value.); |
| 1242 | |
| 1243 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1244 | } |
| 1245 | |
| 1246 | static void cpe_check_exportcxx . . $ cpe_check_export(8c6c84b6ae9161b7).(const struct cpe_checkcxx . . $ cpe_check# *check, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer) |
| 1247 | { |
| 1248 | |
| 1249 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(check); |
| 1250 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(writer); |
| 1251 | |
| 1252 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_CHECK_STRcxx . . $ `src/CPE/cpedict_priv.c:226:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1253 | if (check->systemcxx . . $ cpe_check#system. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1254 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_SYSTEM_STRcxx . . $ `src/CPE/cpedict_priv.c:258:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! check->systemcxx . . $ cpe_check#system.); |
| 1255 | if (check->hrefcxx . . $ cpe_check#href. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1256 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_HREF_STRcxx . . $ `src/CPE/cpedict_priv.c:259:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! check->hrefcxx . . $ cpe_check#href.); |
| 1257 | if (check->identifiercxx . . $ cpe_check#identifier. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1258 | xmlTextWriterWriteStringcxx . . $ xmlTextWriterWriteString(bf445c147f693955).(writer, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! check->identifiercxx . . $ cpe_check#identifier.); |
| 1259 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1260 | } |
| 1261 | |
| 1262 | static void cpe_reference_exportcxx . . $ cpe_reference_export(618380b14d469529).(const struct cpe_referencecxx . . $ cpe_reference# *ref, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer) |
| 1263 | { |
| 1264 | |
| 1265 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(ref); |
| 1266 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(writer); |
| 1267 | |
| 1268 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_REFERENCE_STRcxx . . $ `src/CPE/cpedict_priv.c:234:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1269 | if (ref->hrefcxx . . $ cpe_reference#href. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1270 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, ATTR_HREF_STRcxx . . $ `src/CPE/cpedict_priv.c:259:9`!, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! ref->hrefcxx . . $ cpe_reference#href.); |
| 1271 | if (ref->contentcxx . . $ cpe_reference#content. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1272 | xmlTextWriterWriteStringcxx . . $ xmlTextWriterWriteString(bf445c147f693955).(writer, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! ref->contentcxx . . $ cpe_reference#content.); |
| 1273 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1274 | } |
| 1275 | |
| 1276 | static void cpe_notes_exportcxx . . $ cpe_notes_export(526db04bd1cd24c1).(const struct cpe_notescxx . . $ cpe_notes# *notes, xmlTextWriterPtrcxx . . $ xmlTextWriterPtr# writer) |
| 1277 | { |
| 1278 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(notes); |
| 1279 | __attribute__nonnull__cxx . . $ `src/common/util.h:39:9`!(writer); |
| 1280 | |
| 1281 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_NOTES_STRcxx . . $ `src/CPE/cpedict_priv.c:227:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1282 | if (notes->langcxx . . $ cpe_notes#lang. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1283 | xmlTextWriterWriteAttributecxx . . $ xmlTextWriterWriteAttribute(ea634d2c1b0a45f7).(writer, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! "xml:lang", BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! notes->langcxx . . $ cpe_notes#lang.); |
| 1284 | struct oscap_iteratorcxx . . $ oscap_iterator# *it = oscap_iterator_newcxx . . $ oscap_iterator_new(f89fb456dfd589d7).(notes->notescxx . . $ cpe_notes#notes.); |
| 1285 | while (oscap_iterator_has_morecxx . . $ oscap_iterator_has_more(63b1de9a5adb9205).(it)) { |
| 1286 | const char *note_text = oscap_iterator_nextcxx . . $ oscap_iterator_next(4c75051c806960eb).(it); |
| 1287 | xmlTextWriterStartElementNScxx . . $ xmlTextWriterStartElementNS(98d4c72a1ba35a00).(writer, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, TAG_NOTE_STRcxx . . $ `src/CPE/cpedict_priv.c:235:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1288 | if (note_text != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1289 | xmlTextWriterWriteStringcxx . . $ xmlTextWriterWriteString(bf445c147f693955).(writer, BAD_CASTcxx . . $ `<external>/11592416788776295748/xmlstring.h:34:9`! note_text); |
| 1290 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1291 | } |
| 1292 | oscap_iterator_freecxx . . $ oscap_iterator_free(3cba44c1b7872358).(it); |
| 1293 | xmlTextWriterEndElementcxx . . $ xmlTextWriterEndElement(7e81f973a4eb6684).(writer); |
| 1294 | } |
| 1295 | |
| 1296 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! cpe_dict_model_set_origin_filecxx . . $ cpe_dict_model_set_origin_file(7b7239c1e1f068e0).(struct cpe_dict_modelcxx . . $ cpe_dict_model#* dict, const char* origin_file) |
| 1297 | { |
| 1298 | freecxx . . $ free(5d22bdacc48458e8).(dict->origin_filecxx . . $ cpe_dict_model#origin_file.); |
| 1299 | dict->origin_filecxx . . $ cpe_dict_model#origin_file. = oscap_strdupcxx . . $ oscap_strdup(a8b8e32347182212).(origin_file); |
| 1300 | |
| 1301 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 1302 | } |
| 1303 | |
| 1304 | const char* cpe_dict_model_get_origin_filecxx . . $ cpe_dict_model_get_origin_file(ce13055568eecbfc).(const struct cpe_dict_modelcxx . . $ cpe_dict_model#* dict) |
| 1305 | { |
| 1306 | return dict->origin_filecxx . . $ cpe_dict_model#origin_file.; |
| 1307 | } |
| 1308 | |
| 1309 | /* End of private export functions |
| 1310 | * */ |
| 1311 | /***************************************************************************/ |
| 1312 | |
| 1313 | /***************************************************************************/ |
| 1314 | /* Free functions - all are static private, do not use them outside this file |
| 1315 | */ |
| 1316 | void cpe_dict_model_freecxx . . $ cpe_dict_model_free(99656294ab2c75d7).(struct cpe_dict_modelcxx . . $ cpe_dict_model# *dict) |
| 1317 | { |
| 1318 | if (dict == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1319 | return; |
| 1320 | |
| 1321 | oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(dict->itemscxx . . $ cpe_dict_model#items., (oscap_destruct_funccxx . . $ oscap_destruct_func#) cpe_item_freecxx . . $ cpe_item_free(932b5cee17544225).); |
| 1322 | oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(dict->vendorscxx . . $ cpe_dict_model#vendors., (oscap_destruct_funccxx . . $ oscap_destruct_func#) cpe_vendor_freecxx . . $ cpe_vendor_free(34ec03dd8612a497).); |
| 1323 | cpe_generator_freecxx . . $ cpe_generator_free(b1db96b5764f87c6).(dict->generatorcxx . . $ cpe_dict_model#generator.); |
| 1324 | freecxx . . $ free(5d22bdacc48458e8).(dict->origin_filecxx . . $ cpe_dict_model#origin_file.); |
| 1325 | freecxx . . $ free(5d22bdacc48458e8).(dict); |
| 1326 | } |
| 1327 | |
| 1328 | void cpe_item_freecxx . . $ cpe_item_free(932b5cee17544225).(struct cpe_itemcxx . . $ cpe_item# *item) |
| 1329 | { |
| 1330 | |
| 1331 | if (item == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1332 | return; |
| 1333 | cpe_name_freecxx . . $ cpe_name_free(6799d02d05c0f5d7).(item->namecxx . . $ cpe_item#name.); |
| 1334 | cpe_name_freecxx . . $ cpe_name_free(6799d02d05c0f5d7).(item->deprecated_bycxx . . $ cpe_item#deprecated_by.); |
| 1335 | freecxx . . $ free(5d22bdacc48458e8).(item->deprecation_datecxx . . $ cpe_item#deprecation_date.); |
| 1336 | oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(item->referencescxx . . $ cpe_item#references., (oscap_destruct_funccxx . . $ oscap_destruct_func#) cpe_reference_freecxx . . $ cpe_reference_free(23d6737256cb7c5c).); |
| 1337 | oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(item->checkscxx . . $ cpe_item#checks., (oscap_destruct_funccxx . . $ oscap_destruct_func#) cpe_check_freecxx . . $ cpe_check_free(2e01716f96a17256).); |
| 1338 | oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(item->notescxx . . $ cpe_item#notes., (oscap_destruct_funccxx . . $ oscap_destruct_func#) cpe_notes_freecxx . . $ cpe_notes_free(628608e694f68eda).); |
| 1339 | oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(item->titlescxx . . $ cpe_item#titles., (oscap_destruct_funccxx . . $ oscap_destruct_func#) oscap_text_freecxx . . $ oscap_text_free(c2630df24779e845).); |
| 1340 | cpe_itemmetadata_freecxx . . $ cpe_itemmetadata_free(75c43bcf265e7897).(item->metadatacxx . . $ cpe_item#metadata.); |
| 1341 | cpe23_item_freecxx . . $ cpe23_item_free(946360b5191aeb70).(item->cpe23_itemcxx . . $ cpe_item#cpe23_item.); |
| 1342 | freecxx . . $ free(5d22bdacc48458e8).(item); |
| 1343 | } |
| 1344 | |
| 1345 | void cpe_generator_freecxx . . $ cpe_generator_free(b1db96b5764f87c6).(struct cpe_generatorcxx . . $ cpe_generator# *generator) |
| 1346 | { |
| 1347 | |
| 1348 | if (generator == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1349 | return; |
| 1350 | |
| 1351 | freecxx . . $ free(5d22bdacc48458e8).(generator->product_namecxx . . $ cpe_generator#product_name.); |
| 1352 | freecxx . . $ free(5d22bdacc48458e8).(generator->product_versioncxx . . $ cpe_generator#product_version.); |
| 1353 | freecxx . . $ free(5d22bdacc48458e8).(generator->schema_versioncxx . . $ cpe_generator#schema_version.); |
| 1354 | freecxx . . $ free(5d22bdacc48458e8).(generator->timestampcxx . . $ cpe_generator#timestamp.); |
| 1355 | freecxx . . $ free(5d22bdacc48458e8).(generator); |
| 1356 | } |
| 1357 | |
| 1358 | void cpe_check_freecxx . . $ cpe_check_free(2e01716f96a17256).(struct cpe_checkcxx . . $ cpe_check# *check) |
| 1359 | { |
| 1360 | |
| 1361 | if (check == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1362 | return; |
| 1363 | |
| 1364 | freecxx . . $ free(5d22bdacc48458e8).(check->identifiercxx . . $ cpe_check#identifier.); |
| 1365 | freecxx . . $ free(5d22bdacc48458e8).(check->systemcxx . . $ cpe_check#system.); |
| 1366 | freecxx . . $ free(5d22bdacc48458e8).(check->hrefcxx . . $ cpe_check#href.); |
| 1367 | freecxx . . $ free(5d22bdacc48458e8).(check); |
| 1368 | } |
| 1369 | |
| 1370 | void cpe_reference_freecxx . . $ cpe_reference_free(23d6737256cb7c5c).(struct cpe_referencecxx . . $ cpe_reference# *ref) |
| 1371 | { |
| 1372 | |
| 1373 | if (ref == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1374 | return; |
| 1375 | |
| 1376 | freecxx . . $ free(5d22bdacc48458e8).(ref->hrefcxx . . $ cpe_reference#href.); |
| 1377 | freecxx . . $ free(5d22bdacc48458e8).(ref->contentcxx . . $ cpe_reference#content.); |
| 1378 | freecxx . . $ free(5d22bdacc48458e8).(ref); |
| 1379 | } |
| 1380 | |
| 1381 | void cpe_notes_freecxx . . $ cpe_notes_free(628608e694f68eda).(struct cpe_notescxx . . $ cpe_notes# *notes) |
| 1382 | { |
| 1383 | if (notes != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 1384 | oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(notes->notescxx . . $ cpe_notes#notes., (oscap_destruct_funccxx . . $ oscap_destruct_func#) freecxx . . $ free(5d22bdacc48458e8).); |
| 1385 | freecxx . . $ free(5d22bdacc48458e8).(notes->langcxx . . $ cpe_notes#lang.); |
| 1386 | freecxx . . $ free(5d22bdacc48458e8).(notes); |
| 1387 | } |
| 1388 | } |
| 1389 | |
| 1390 | void cpe_vendor_freecxx . . $ cpe_vendor_free(34ec03dd8612a497).(struct cpe_vendorcxx . . $ cpe_vendor# *vendor) |
| 1391 | { |
| 1392 | |
| 1393 | if (vendor == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1394 | return; |
| 1395 | |
| 1396 | freecxx . . $ free(5d22bdacc48458e8).(vendor->valuecxx . . $ cpe_vendor#value.); |
| 1397 | oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(vendor->titlescxx . . $ cpe_vendor#titles., (oscap_destruct_funccxx . . $ oscap_destruct_func#) oscap_text_freecxx . . $ oscap_text_free(c2630df24779e845).); |
| 1398 | oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(vendor->productscxx . . $ cpe_vendor#products., (oscap_destruct_funccxx . . $ oscap_destruct_func#) cpe_product_freecxx . . $ cpe_product_free(be7a9e9ae662a08c).); |
| 1399 | freecxx . . $ free(5d22bdacc48458e8).(vendor); |
| 1400 | } |
| 1401 | |
| 1402 | void cpe_product_freecxx . . $ cpe_product_free(be7a9e9ae662a08c).(struct cpe_productcxx . . $ cpe_product# *product) |
| 1403 | { |
| 1404 | |
| 1405 | if (product == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1406 | return; |
| 1407 | |
| 1408 | freecxx . . $ free(5d22bdacc48458e8).(product->valuecxx . . $ cpe_product#value.); |
| 1409 | oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(product->versionscxx . . $ cpe_product#versions., (oscap_destruct_funccxx . . $ oscap_destruct_func#) cpe_version_freecxx . . $ cpe_version_free(d13052f37034d62b).); |
| 1410 | freecxx . . $ free(5d22bdacc48458e8).(product); |
| 1411 | } |
| 1412 | |
| 1413 | void cpe_version_freecxx . . $ cpe_version_free(d13052f37034d62b).(struct cpe_versioncxx . . $ cpe_version# *version) |
| 1414 | { |
| 1415 | |
| 1416 | if (version == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1417 | return; |
| 1418 | |
| 1419 | freecxx . . $ free(5d22bdacc48458e8).(version->valuecxx . . $ cpe_version#value.); |
| 1420 | oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(version->updatescxx . . $ cpe_version#updates., (oscap_destruct_funccxx . . $ oscap_destruct_func#) cpe_update_freecxx . . $ cpe_update_free(a5418157c25b02bc).); |
| 1421 | freecxx . . $ free(5d22bdacc48458e8).(version); |
| 1422 | } |
| 1423 | |
| 1424 | void cpe_update_freecxx . . $ cpe_update_free(a5418157c25b02bc).(struct cpe_updatecxx . . $ cpe_update# *update) |
| 1425 | { |
| 1426 | |
| 1427 | if (update == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1428 | return; |
| 1429 | |
| 1430 | freecxx . . $ free(5d22bdacc48458e8).(update->valuecxx . . $ cpe_update#value.); |
| 1431 | oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(update->editionscxx . . $ cpe_update#editions., (oscap_destruct_funccxx . . $ oscap_destruct_func#) cpe_edition_freecxx . . $ cpe_edition_free(60715bb584b48970).); |
| 1432 | freecxx . . $ free(5d22bdacc48458e8).(update); |
| 1433 | } |
| 1434 | |
| 1435 | void cpe_edition_freecxx . . $ cpe_edition_free(60715bb584b48970).(struct cpe_editioncxx . . $ cpe_edition# *edition) |
| 1436 | { |
| 1437 | |
| 1438 | if (edition == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1439 | return; |
| 1440 | |
| 1441 | freecxx . . $ free(5d22bdacc48458e8).(edition->valuecxx . . $ cpe_edition#value.); |
| 1442 | oscap_list_freecxx . . $ oscap_list_free(e68e105c3900fcc1).(edition->languagescxx . . $ cpe_edition#languages., (oscap_destruct_funccxx . . $ oscap_destruct_func#) cpe_language_freecxx . . $ cpe_language_free(a0000d5b1a214da6).); |
| 1443 | freecxx . . $ free(5d22bdacc48458e8).(edition); |
| 1444 | } |
| 1445 | |
| 1446 | void cpe_language_freecxx . . $ cpe_language_free(a0000d5b1a214da6).(struct cpe_languagecxx . . $ cpe_language# *language) |
| 1447 | { |
| 1448 | |
| 1449 | if (language == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1450 | return; |
| 1451 | |
| 1452 | freecxx . . $ free(5d22bdacc48458e8).(language->valuecxx . . $ cpe_language#value.); |
| 1453 | freecxx . . $ free(5d22bdacc48458e8).(language); |
| 1454 | } |
| 1455 | |
| 1456 | void cpe_itemmetadata_freecxx . . $ cpe_itemmetadata_free(75c43bcf265e7897).(struct cpe_item_metadatacxx . . $ cpe_item_metadata# *meta) |
| 1457 | { |
| 1458 | |
| 1459 | if (meta == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 1460 | return; |
| 1461 | |
| 1462 | freecxx . . $ free(5d22bdacc48458e8).(meta->modification_datecxx . . $ cpe_item_metadata#modification_date.); |
| 1463 | freecxx . . $ free(5d22bdacc48458e8).(meta->statuscxx . . $ cpe_item_metadata#status.); |
| 1464 | freecxx . . $ free(5d22bdacc48458e8).(meta->nvd_idcxx . . $ cpe_item_metadata#nvd_id.); |
| 1465 | freecxx . . $ free(5d22bdacc48458e8).(meta->deprecated_by_nvd_idcxx . . $ cpe_item_metadata#deprecated_by_nvd_id.); |
| 1466 | freecxx . . $ free(5d22bdacc48458e8).(meta); |
| 1467 | } |
| 1468 | |
| 1469 | /* End of free functions |
| 1470 | * */ |
| 1471 | /***************************************************************************/ |