Task #88623 - added.err
back to task #88623download
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/xccdf_session.c: scope_hint: In function ‘_xccdf_session_get_oval_from_model’
openscap-1.4.4/src/XCCDF/xccdf_session.c:1059:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘resources’
# 1057|
# 1058| resources = malloc(sizeof(struct oval_content_resource *));
# 1059|-> resources[idx] = NULL;
# 1060|
# 1061| files = xccdf_policy_model_get_systems_and_files(session->xccdf.policy_model);
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/xccdf_session.c:1100:46: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*<unknown>’
openscap-1.4.4/src/XCCDF/xccdf_session.c: scope_hint: In function ‘_xccdf_session_get_oval_from_model’
# 1098| if (source != NULL) {
# 1099| resources[idx] = malloc(sizeof(struct oval_content_resource));
# 1100|-> resources[idx]->href = oscap_strdup(oscap_file_entry_get_file(file_entry));
# 1101| resources[idx]->source_owned = source_owned;
# 1102| resources[idx]->source = source;
Error: GCC_ANALYZER_WARNING (CWE-476):
openscap-1.4.4/src/XCCDF/xccdf_session.c:1130:70: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(24)’
openscap-1.4.4/src/XCCDF/xccdf_session.c: scope_hint: In function ‘_xccdf_session_get_oval_from_model’
# 1128|
# 1129| resources[idx] = malloc(sizeof(struct oval_content_resource));
# 1130|-> resources[idx]->href = oscap_strdup(printable_path);
# 1131| resources[idx]->source = oscap_source_new_take_memory(data, data_size, printable_path);
# 1132| resources[idx]->source_owned = true;