Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:230:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 228| SEXP_t *msg; # 229| msg = probe_msg_creatf(OVAL_MESSAGE_LEVEL_ERROR, "xmlXPathEvalExpression() error"); # 230|-> probe_cobj_add_msg(probe_ctx_getresult(pfd->ctx), msg); # 231| SEXP_free(msg); # 232| probe_cobj_set_flag(probe_ctx_getresult(pfd->ctx), SYSCHAR_FLAG_ERROR); Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:231:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 229| msg = probe_msg_creatf(OVAL_MESSAGE_LEVEL_ERROR, "xmlXPathEvalExpression() error"); # 230| probe_cobj_add_msg(probe_ctx_getresult(pfd->ctx), msg); # 231|-> SEXP_free(msg); # 232| probe_cobj_set_flag(probe_ctx_getresult(pfd->ctx), SYSCHAR_FLAG_ERROR); # 233| Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:232:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 230| probe_cobj_add_msg(probe_ctx_getresult(pfd->ctx), msg); # 231| SEXP_free(msg); # 232|-> probe_cobj_set_flag(probe_ctx_getresult(pfd->ctx), SYSCHAR_FLAG_ERROR); # 233| # 234| ret = -3; Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:245:16: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 243| } # 244| # 245|-> item = probe_item_create(OVAL_INDEPENDENT_XML_FILE_CONTENT, NULL, # 246| "filepath", OVAL_DATATYPE_STRING, filepath, # 247| "path", OVAL_DATATYPE_STRING, path, Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:259:21: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 257| int b; # 258| # 259|-> b = xmlXPathCastToBoolean(xpath_obj); # 260| val = SEXP_number_newb(b); # 261| probe_item_ent_add(item, "value_of", NULL, val); Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:260:23: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 258| # 259| b = xmlXPathCastToBoolean(xpath_obj); # 260|-> val = SEXP_number_newb(b); # 261| probe_item_ent_add(item, "value_of", NULL, val); # 262| SEXP_free(val); Error: GCC_ANALYZER_WARNING (CWE-401): [#def7] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:261:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 259| b = xmlXPathCastToBoolean(xpath_obj); # 260| val = SEXP_number_newb(b); # 261|-> probe_item_ent_add(item, "value_of", NULL, val); # 262| SEXP_free(val); # 263| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:262:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 260| val = SEXP_number_newb(b); # 261| probe_item_ent_add(item, "value_of", NULL, val); # 262|-> SEXP_free(val); # 263| break; # 264| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:270:21: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 268| double d; # 269| # 270|-> d = xmlXPathCastToNumber(xpath_obj); # 271| val = SEXP_number_newi_32(d); # 272| probe_item_ent_add(item, "value_of", NULL, val); Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:271:23: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 269| # 270| d = xmlXPathCastToNumber(xpath_obj); # 271|-> val = SEXP_number_newi_32(d); # 272| probe_item_ent_add(item, "value_of", NULL, val); # 273| SEXP_free(val); Error: GCC_ANALYZER_WARNING (CWE-401): [#def11] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:272:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 270| d = xmlXPathCastToNumber(xpath_obj); # 271| val = SEXP_number_newi_32(d); # 272|-> probe_item_ent_add(item, "value_of", NULL, val); # 273| SEXP_free(val); # 274| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:273:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 271| val = SEXP_number_newi_32(d); # 272| probe_item_ent_add(item, "value_of", NULL, val); # 273|-> SEXP_free(val); # 274| break; # 275| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def13] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:281:30: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 279| char *s; # 280| # 281|-> s = (char *) xmlXPathCastToString(xpath_obj); # 282| val = SEXP_string_newf("%s", s); # 283| xmlFree(s); Error: GCC_ANALYZER_WARNING (CWE-401): [#def14] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:282:23: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 280| # 281| s = (char *) xmlXPathCastToString(xpath_obj); # 282|-> val = SEXP_string_newf("%s", s); # 283| xmlFree(s); # 284| probe_item_ent_add(item, "value_of", NULL, val); Error: GCC_ANALYZER_WARNING (CWE-401): [#def15] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:283:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 281| s = (char *) xmlXPathCastToString(xpath_obj); # 282| val = SEXP_string_newf("%s", s); # 283|-> xmlFree(s); # 284| probe_item_ent_add(item, "value_of", NULL, val); # 285| SEXP_free(val); Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:284:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 282| val = SEXP_string_newf("%s", s); # 283| xmlFree(s); # 284|-> probe_item_ent_add(item, "value_of", NULL, val); # 285| SEXP_free(val); # 286| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:285:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 283| xmlFree(s); # 284| probe_item_ent_add(item, "value_of", NULL, val); # 285|-> SEXP_free(val); # 286| break; # 287| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def18] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:315:49: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 313| xmlChar *value; # 314| # 315|-> value = xmlNodeGetContent(cur_node); # 316| probe_item_ent_add(item, "value_of", NULL, # 317| r0 = SEXP_string_newf ("%s", (char *) value)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:316:41: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 314| # 315| value = xmlNodeGetContent(cur_node); # 316|-> probe_item_ent_add(item, "value_of", NULL, # 317| r0 = SEXP_string_newf ("%s", (char *) value)); # 318| xmlFree(value); Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:317:65: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 315| value = xmlNodeGetContent(cur_node); # 316| probe_item_ent_add(item, "value_of", NULL, # 317|-> r0 = SEXP_string_newf ("%s", (char *) value)); # 318| xmlFree(value); # 319| SEXP_free (r0); Error: GCC_ANALYZER_WARNING (CWE-401): [#def21] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:318:41: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 316| probe_item_ent_add(item, "value_of", NULL, # 317| r0 = SEXP_string_newf ("%s", (char *) value)); # 318|-> xmlFree(value); # 319| SEXP_free (r0); # 320| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def22] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:319:41: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 317| r0 = SEXP_string_newf ("%s", (char *) value)); # 318| xmlFree(value); # 319|-> SEXP_free (r0); # 320| } # 321| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def23] openscap-1.4.4/src/OVAL/probes/independent/xmlfilecontent_probe.c:326:17: warning[-Wanalyzer-malloc-leak]: leak of ‘whole_path’ # 324| } # 325| default: # 326|-> probe_item_setstatus(item, SYSCHAR_STATUS_DOES_NOT_EXIST); # 327| break; # 328| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def24] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c: scope_hint: In function ‘inetlisteningservers_probe_main’ openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:566:29: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ # 564| memset(req, 0, sizeof(*req)); # 565| # 566|-> req->protocol_ent = probe_obj_getent(object, "protocol", 1); # 567| if (req->protocol_ent == NULL) { # 568| err = PROBE_ENOVAL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def25] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:572:34: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ # 570| } # 571| # 572|-> req->local_address_ent = probe_obj_getent(object, "local_address", 1); # 573| if (req->local_address_ent == NULL) { # 574| err = PROBE_ENOVAL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:578:31: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ # 576| } # 577| # 578|-> req->local_port_ent = probe_obj_getent(object, "local_port", 1); # 579| if (req->local_port_ent == NULL) { # 580| err = PROBE_ENOVAL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def27] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:589:23: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c: scope_hint: In function ‘inetlisteningservers_probe_main’ # 587| SEXP_t *msg; # 588| # 589|-> msg = probe_msg_creat(OVAL_MESSAGE_LEVEL_ERROR, "Permission error."); # 590| probe_cobj_add_msg(probe_ctx_getresult(ctx), msg); # 591| SEXP_free(msg); Error: GCC_ANALYZER_WARNING (CWE-401): [#def28] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:590:17: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c: scope_hint: In function ‘inetlisteningservers_probe_main’ # 588| # 589| msg = probe_msg_creat(OVAL_MESSAGE_LEVEL_ERROR, "Permission error."); # 590|-> probe_cobj_add_msg(probe_ctx_getresult(ctx), msg); # 591| SEXP_free(msg); # 592| probe_cobj_set_flag(probe_ctx_getresult(ctx), SYSCHAR_FLAG_ERROR); Error: GCC_ANALYZER_WARNING (CWE-401): [#def29] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:591:17: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c: scope_hint: In function ‘inetlisteningservers_probe_main’ # 589| msg = probe_msg_creat(OVAL_MESSAGE_LEVEL_ERROR, "Permission error."); # 590| probe_cobj_add_msg(probe_ctx_getresult(ctx), msg); # 591|-> SEXP_free(msg); # 592| probe_cobj_set_flag(probe_ctx_getresult(ctx), SYSCHAR_FLAG_ERROR); # 593| Error: GCC_ANALYZER_WARNING (CWE-401): [#def30] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:592:17: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c: scope_hint: In function ‘inetlisteningservers_probe_main’ # 590| probe_cobj_add_msg(probe_ctx_getresult(ctx), msg); # 591| SEXP_free(msg); # 592|-> probe_cobj_set_flag(probe_ctx_getresult(ctx), SYSCHAR_FLAG_ERROR); # 593| # 594| err = 0; Error: GCC_ANALYZER_WARNING (CWE-401): [#def31] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:615:9: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ # 613| err = 0; # 614| cleanup: # 615|-> SEXP_free(req->protocol_ent); # 616| SEXP_free(req->local_address_ent); # 617| SEXP_free(req->local_port_ent); Error: GCC_ANALYZER_WARNING (CWE-401): [#def32] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:616:9: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ # 614| cleanup: # 615| SEXP_free(req->protocol_ent); # 616|-> SEXP_free(req->local_address_ent); # 617| SEXP_free(req->local_port_ent); # 618| free(req); Error: GCC_ANALYZER_WARNING (CWE-401): [#def33] openscap-1.4.4/src/OVAL/probes/unix/linux/inetlisteningservers_probe.c:617:9: warning[-Wanalyzer-malloc-leak]: leak of ‘req’ # 615| SEXP_free(req->protocol_ent); # 616| SEXP_free(req->local_address_ent); # 617|-> SEXP_free(req->local_port_ent); # 618| free(req); # 619| Error: GCC_ANALYZER_WARNING (CWE-401): [#def34] openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:184:41: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&pathbuf)’ # 182| start = kill = false; # 183| # 184|-> while ((rc_dp = readdir(rc_dir)) != NULL) { # 185| if (stat(rc_dp->d_name, &rc_st) != 0) { # 186| dD("Can't stat file %s/%s: errno=%d, %s.", Error: GCC_ANALYZER_WARNING (CWE-476): [#def35] openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:225:47: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rep_lst’ # 223| } # 224| # 225|-> rep_lst->service_name = strdup(service_name); # 226| rep_lst->runlevel = strdup(runlevel); # 227| rep_lst->start = start; Error: GCC_ANALYZER_WARNING (CWE-401): [#def36] openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:232:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(".")’ # 230| } # 231| } # 232|-> closedir(init_dir); # 233| # 234| if (fchdir(dirfd(orig_dir)) == -1) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def37] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_new’ openscap-1.4.4/src/SCE/sce_engine.c:81:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’ # 79| { # 80| struct sce_check_result* ret = malloc(sizeof(struct sce_check_result)); # 81|-> ret->href = NULL; # 82| ret->basename = NULL; # 83| ret->std_out = NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def38] openscap-1.4.4/src/SCE/sce_engine.c:85:38: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 83| ret->std_out = NULL; # 84| ret->std_err = NULL; # 85|-> ret->environment_variables = oscap_stringlist_new(); # 86| ret->xccdf_result = XCCDF_RESULT_UNKNOWN; # 87| Error: GCC_ANALYZER_WARNING (CWE-401): [#def39] openscap-1.4.4/src/SCE/sce_engine.c:85:38: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’ # 83| ret->std_out = NULL; # 84| ret->std_err = NULL; # 85|-> ret->environment_variables = oscap_stringlist_new(); # 86| ret->xccdf_result = XCCDF_RESULT_UNKNOWN; # 87| Error: GCC_ANALYZER_WARNING (CWE-401): [#def40] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_engine_eval_rule’ openscap-1.4.4/src/SCE/sce_engine.c:108:15: warning[-Wanalyzer-malloc-leak]: leak of ‘sce_check_result_new()’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_engine_eval_rule’ # 106| void sce_check_result_set_href(struct sce_check_result* v, const char* href) # 107| { # 108|-> free(v->href); # 109| v->href = oscap_strdup(href); # 110| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def41] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_export’ openscap-1.4.4/src/SCE/sce_engine.c:125:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(target_file, "w")’ # 123| const char* sce_check_result_get_basename(struct sce_check_result* v) # 124| { # 125|-> return v->basename; # 126| } # 127| Error: GCC_ANALYZER_WARNING (CWE-401): [#def42] openscap-1.4.4/src/SCE/sce_engine.c:125:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(target_file, "w")’ # 123| const char* sce_check_result_get_basename(struct sce_check_result* v) # 124| { # 125|-> return v->basename; # 126| } # 127| Error: GCC_ANALYZER_WARNING (CWE-401): [#def43] openscap-1.4.4/src/SCE/sce_engine.c:168:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ # 166| void sce_check_result_add_environment_variable(struct sce_check_result* v, const char* var) # 167| { # 168|-> oscap_stringlist_add_string(v->environment_variables, var); # 169| } # 170| Error: GCC_ANALYZER_WARNING (CWE-401): [#def44] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c:168:9: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_check_result_add_environment_variable’ # 166| void sce_check_result_add_environment_variable(struct sce_check_result* v, const char* var) # 167| { # 168|-> oscap_stringlist_add_string(v->environment_variables, var); # 169| } # 170| Error: GCC_ANALYZER_WARNING (CWE-476): [#def45] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_session_new’ openscap-1.4.4/src/SCE/sce_engine.c:225:22: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’ # 223| { # 224| struct sce_session* ret = malloc(sizeof(struct sce_session)); # 225|-> ret->results = oscap_list_new(); # 226| # 227| return ret; Error: GCC_ANALYZER_WARNING (CWE-401): [#def46] openscap-1.4.4/src/SCE/sce_engine.c:225:24: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’ # 223| { # 224| struct sce_session* ret = malloc(sizeof(struct sce_session)); # 225|-> ret->results = oscap_list_new(); # 226| # 227| return ret; Error: GCC_ANALYZER_WARNING (CWE-476): [#def47] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_parameters_new’ openscap-1.4.4/src/SCE/sce_engine.c:281:30: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ret’ # 279| { # 280| struct sce_parameters *ret = malloc(sizeof(struct sce_parameters)); # 281|-> ret->xccdf_directory = NULL; # 282| ret->session = NULL; # 283| Error: GCC_ANALYZER_WARNING (CWE-401): [#def48] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_parameters_set_session’ openscap-1.4.4/src/SCE/sce_engine.c:313:9: warning[-Wanalyzer-malloc-leak]: leak of ‘sce_session_new()’ # 311| void sce_parameters_set_session(struct sce_parameters* v, struct sce_session* value) # 312| { # 313|-> sce_session_free(v->session); # 314| v->session = value; # 315| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def49] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘_pipe_try_read_into_string’ openscap-1.4.4/src/SCE/sce_engine.c:337:33: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 335| // & is a special case, we have to "escape" it manually # 336| // (all else will eventually get handled by libxml) # 337|-> oscap_string_append_string(string, "&"); # 338| } else { # 339| oscap_string_append_char(string, readbuf); Error: GCC_ANALYZER_WARNING (CWE-401): [#def50] openscap-1.4.4/src/SCE/sce_engine.c:339:33: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 337| oscap_string_append_string(string, "&"); # 338| } else { # 339|-> oscap_string_append_char(string, readbuf); # 340| } # 341| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def51] openscap-1.4.4/src/SCE/sce_engine.c: scope_hint: In function ‘sce_engine_eval_rule’ openscap-1.4.4/src/SCE/sce_engine.c:415:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘env_values’ # 413| const size_t index_of_first_env_value_not_compiled_in = 10; # 414| # 415|-> env_values[0] = "PATH=/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin"; # 416| # 417| env_values[1] = "XCCDF_RESULT_PASS=101"; Error: GCC_ANALYZER_WARNING (CWE-401): [#def52] openscap-1.4.4/src/SCE/sce_engine.c:427:16: warning[-Wanalyzer-malloc-leak]: leak of ‘env_values’ # 425| env_values[9] = "XCCDF_RESULT_FIXED=109"; # 426| # 427|-> while (xccdf_value_binding_iterator_has_more(value_binding_it)) # 428| { # 429| struct xccdf_value_binding* binding = xccdf_value_binding_iterator_next(value_binding_it); Error: GCC_ANALYZER_WARNING (CWE-401): [#def53] openscap-1.4.4/src/SCE/sce_engine.c:427:16: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 425| env_values[9] = "XCCDF_RESULT_FIXED=109"; # 426| # 427|-> while (xccdf_value_binding_iterator_has_more(value_binding_it)) # 428| { # 429| struct xccdf_value_binding* binding = xccdf_value_binding_iterator_next(value_binding_it); Error: GCC_ANALYZER_WARNING (CWE-401): [#def54] openscap-1.4.4/src/SCE/sce_engine.c:429:55: warning[-Wanalyzer-malloc-leak]: leak of ‘env_values’ # 427| while (xccdf_value_binding_iterator_has_more(value_binding_it)) # 428| { # 429|-> struct xccdf_value_binding* binding = xccdf_value_binding_iterator_next(value_binding_it); # 430| # 431| void *new_env_values = realloc(env_values, (env_value_count + 3) * sizeof(char *)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def55] openscap-1.4.4/src/SCE/sce_engine.c:429:55: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 427| while (xccdf_value_binding_iterator_has_more(value_binding_it)) # 428| { # 429|-> struct xccdf_value_binding* binding = xccdf_value_binding_iterator_next(value_binding_it); # 430| # 431| void *new_env_values = realloc(env_values, (env_value_count + 3) * sizeof(char *)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def56] openscap-1.4.4/src/SCE/sce_engine.c:439:30: warning[-Wanalyzer-malloc-leak]: leak of ‘env_values’ # 437| env_values = new_env_values; # 438| # 439|-> char* name = xccdf_value_binding_get_name(binding); # 440| xccdf_value_type_t type = xccdf_value_binding_get_type(binding); # 441| char* value = xccdf_value_binding_get_setvalue(binding); Error: GCC_ANALYZER_WARNING (CWE-401): [#def57] openscap-1.4.4/src/SCE/sce_engine.c:439:30: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 437| env_values = new_env_values; # 438| # 439|-> char* name = xccdf_value_binding_get_name(binding); # 440| xccdf_value_type_t type = xccdf_value_binding_get_type(binding); # 441| char* value = xccdf_value_binding_get_setvalue(binding); Error: GCC_ANALYZER_WARNING (CWE-401): [#def58] openscap-1.4.4/src/SCE/sce_engine.c:440:43: warning[-Wanalyzer-malloc-leak]: leak of ‘env_values’ # 438| # 439| char* name = xccdf_value_binding_get_name(binding); # 440|-> xccdf_value_type_t type = xccdf_value_binding_get_type(binding); # 441| char* value = xccdf_value_binding_get_setvalue(binding); # 442| if (value == NULL) Error: GCC_ANALYZER_WARNING (CWE-401): [#def59] openscap-1.4.4/src/SCE/sce_engine.c:440:43: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 438| # 439| char* name = xccdf_value_binding_get_name(binding); # 440|-> xccdf_value_type_t type = xccdf_value_binding_get_type(binding); # 441| char* value = xccdf_value_binding_get_setvalue(binding); # 442| if (value == NULL) Error: GCC_ANALYZER_WARNING (CWE-401): [#def60] openscap-1.4.4/src/SCE/sce_engine.c:441:31: warning[-Wanalyzer-malloc-leak]: leak of ‘env_values’ # 439| char* name = xccdf_value_binding_get_name(binding); # 440| xccdf_value_type_t type = xccdf_value_binding_get_type(binding); # 441|-> char* value = xccdf_value_binding_get_setvalue(binding); # 442| if (value == NULL) # 443| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def61] openscap-1.4.4/src/SCE/sce_engine.c:441:31: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 439| char* name = xccdf_value_binding_get_name(binding); # 440| xccdf_value_type_t type = xccdf_value_binding_get_type(binding); # 441|-> char* value = xccdf_value_binding_get_setvalue(binding); # 442| if (value == NULL) # 443| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def62] openscap-1.4.4/src/SCE/sce_engine.c:444:33: warning[-Wanalyzer-malloc-leak]: leak of ‘env_values’ # 442| if (value == NULL) # 443| { # 444|-> value = xccdf_value_binding_get_value(binding); # 445| if (value == NULL) { # 446| value = ""; Error: GCC_ANALYZER_WARNING (CWE-401): [#def63] openscap-1.4.4/src/SCE/sce_engine.c:444:33: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 442| if (value == NULL) # 443| { # 444|-> value = xccdf_value_binding_get_value(binding); # 445| if (value == NULL) { # 446| value = ""; Error: GCC_ANALYZER_WARNING (CWE-401): [#def64] openscap-1.4.4/src/SCE/sce_engine.c:449:45: warning[-Wanalyzer-malloc-leak]: leak of ‘env_values’ # 447| } # 448| } # 449|-> xccdf_operator_t operator = xccdf_value_binding_get_operator(binding); # 450| # 451| char* type_str; Error: GCC_ANALYZER_WARNING (CWE-401): [#def65] openscap-1.4.4/src/SCE/sce_engine.c:449:45: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 447| } # 448| } # 449|-> xccdf_operator_t operator = xccdf_value_binding_get_operator(binding); # 450| # 451| char* type_str; Error: GCC_ANALYZER_WARNING (CWE-401): [#def66] openscap-1.4.4/src/SCE/sce_engine.c:469:40: warning[-Wanalyzer-malloc-leak]: leak of ‘env_values’ # 467| } # 468| # 469|-> char* env_type_entry = oscap_sprintf("XCCDF_TYPE_%s=%s", name, type_str); # 470| char* env_value_entry = oscap_sprintf("XCCDF_VALUE_%s=%s", name, value); # 471| Error: GCC_ANALYZER_WARNING (CWE-401): [#def67] openscap-1.4.4/src/SCE/sce_engine.c:469:40: warning[-Wanalyzer-malloc-leak]: leak of ‘new_env_values’ # 467| } # 468| # 469|-> char* env_type_entry = oscap_sprintf("XCCDF_TYPE_%s=%s", name, type_str); # 470| char* env_value_entry = oscap_sprintf("XCCDF_VALUE_%s=%s", name, value); # 471| Error: GCC_ANALYZER_WARNING (CWE-401): [#def68] openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c:181:59: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/helpers.h:118:17: note: in expansion of macro ‘XCCDF_ITERATOR_GETTER’ openscap-1.4.4/src/XCCDF/helpers.h:123:17: note: in expansion of macro ‘XCCDF_IGETTER’ openscap-1.4.4/src/XCCDF/result.c:170:1: note: in expansion of macro ‘XCCDF_LISTMANIP’ openscap-1.4.4/src/XCCDF/helpers.h:118:17: note: in expansion of macro ‘XCCDF_ITERATOR_GETTER’ openscap-1.4.4/src/XCCDF/helpers.h:123:17: note: in expansion of macro ‘XCCDF_IGETTER’ openscap-1.4.4/src/XCCDF/result.c:170:1: note: in expansion of macro ‘XCCDF_LISTMANIP’ openscap-1.4.4/src/XCCDF/helpers.h:118:17: note: in expansion of macro ‘XCCDF_ITERATOR_GETTER’ openscap-1.4.4/src/XCCDF/helpers.h:123:17: note: in expansion of macro ‘XCCDF_IGETTER’ openscap-1.4.4/src/XCCDF/result.c:170:1: note: in expansion of macro ‘XCCDF_LISTMANIP’ # 179| static inline void _xccdf_result_add_target_fact_uniq(struct xccdf_result *result, struct xccdf_target_fact *fact) # 180| { # 181|-> struct xccdf_target_fact_iterator *target_facts = xccdf_result_get_target_facts(result); # 182| while (xccdf_target_fact_iterator_has_more(target_facts)) { # 183| struct xccdf_target_fact *target_fact = xccdf_target_fact_iterator_next(target_facts); Error: GCC_ANALYZER_WARNING (CWE-401): [#def69] openscap-1.4.4/src/XCCDF/result.c:182:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/debug_priv.h:47:102: note: in definition of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:62:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/XCCDF/result.c:317:25: note: in expansion of macro ‘dW’ openscap-1.4.4/src/XCCDF/helpers.h:127:17: note: in expansion of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:166:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/helpers.h:121:71: note: in definition of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:166:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:659:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:659:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/helpers.h:127:17: note: in expansion of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:167:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/helpers.h:121:71: note: in definition of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:167:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:117:41: note: in definition of macro ‘OSCAP_ITERATOR_HAS_MORE’ openscap-1.4.4/src/common/util.h:123:31: note: in expansion of macro ‘OSCAP_ITERATOR_GEN_T’ openscap-1.4.4/src/XCCDF/result.c:772:1: note: in expansion of macro ‘OSCAP_ITERATOR_GEN’ openscap-1.4.4/src/common/util.h:122:57: note: in expansion of macro ‘OSCAP_ITERATOR_HAS_MORE’ openscap-1.4.4/src/common/util.h:123:31: note: in expansion of macro ‘OSCAP_ITERATOR_GEN_T’ openscap-1.4.4/src/XCCDF/result.c:772:1: note: in expansion of macro ‘OSCAP_ITERATOR_GEN’ openscap-1.4.4/src/common/util.h:122:57: note: in expansion of macro ‘OSCAP_ITERATOR_HAS_MORE’ openscap-1.4.4/src/common/util.h:123:31: note: in expansion of macro ‘OSCAP_ITERATOR_GEN_T’ openscap-1.4.4/src/XCCDF/result.c:772:1: note: in expansion of macro ‘OSCAP_ITERATOR_GEN’ # 180| { # 181| struct xccdf_target_fact_iterator *target_facts = xccdf_result_get_target_facts(result); # 182|-> while (xccdf_target_fact_iterator_has_more(target_facts)) { # 183| struct xccdf_target_fact *target_fact = xccdf_target_fact_iterator_next(target_facts); # 184| if (target_fact->type == fact->type) Error: GCC_ANALYZER_WARNING (CWE-401): [#def70] openscap-1.4.4/src/XCCDF/result.c:184:40: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/debug_priv.h:47:102: note: in definition of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:62:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/XCCDF/result.c:317:25: note: in expansion of macro ‘dW’ openscap-1.4.4/src/XCCDF/helpers.h:127:17: note: in expansion of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:166:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/helpers.h:121:71: note: in definition of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:166:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:659:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:659:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/helpers.h:127:17: note: in expansion of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:167:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/helpers.h:121:71: note: in definition of macro ‘XCCDF_ADDER’ openscap-1.4.4/src/XCCDF/result.c:167:1: note: in expansion of macro ‘XCCDF_LISTMANIP_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:194:55: note: in definition of macro ‘OSCAP_SETTER_HEADER’ openscap-1.4.4/src/common/util.h:240:9: note: in expansion of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/common/util.h:217:45: note: in definition of macro ‘OSCAP_SETTER_GENERIC’ openscap-1.4.4/src/common/util.h:246:49: note: in expansion of macro ‘OSCAP_SETTER_STRING’ openscap-1.4.4/src/XCCDF/result.c:771:1: note: in expansion of macro ‘OSCAP_ACCESSOR_STRING’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/XCCDF/result.c: scope_hint: In function ‘_xccdf_result_add_target_fact_uniq’ openscap-1.4.4/src/common/util.h:118:36: note: in definition of macro ‘OSCAP_ITERATOR_NEXT’ openscap-1.4.4/src/common/util.h:123:31: note: in expansion of macro ‘OSCAP_ITERATOR_GEN_T’ openscap-1.4.4/src/XCCDF/result.c:772:1: note: in expansion of macro ‘OSCAP_ITERATOR_GEN’ openscap-1.4.4/src/common/util.h:122:108: note: in expansion of macro ‘OSCAP_ITERATOR_NEXT’ openscap-1.4.4/src/common/util.h:123:31: note: in expansion of macro ‘OSCAP_ITERATOR_GEN_T’ openscap-1.4.4/src/XCCDF/result.c:772:1: note: in expansion of macro ‘OSCAP_ITERATOR_GEN’ openscap-1.4.4/src/common/util.h:122:108: note: in expansion of macro ‘OSCAP_ITERATOR_NEXT’ openscap-1.4.4/src/common/util.h:123:31: note: in expansion of macro ‘OSCAP_ITERATOR_GEN_T’ openscap-1.4.4/src/XCCDF/result.c:772:1: note: in expansion of macro ‘OSCAP_ITERATOR_GEN’ # 182| while (xccdf_target_fact_iterator_has_more(target_facts)) { # 183| struct xccdf_target_fact *target_fact = xccdf_target_fact_iterator_next(target_facts); # 184|-> if (target_fact->type == fact->type) # 185| if (target_fact->name != NULL && fact->name != NULL && !strcmp(target_fact->name, fact->name)) # 186| if (target_fact->value != NULL && fact->value != NULL && !strcmp(target_fact->value, fact->value)) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def71] openscap-1.4.4/src/XCCDF/tailoring.c:191:51: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/XCCDF/tailoring.c:126:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/tailoring.c: scope_hint: In function ‘xccdf_tailoring_parse’ # 189| dI("Parsing Tailoring Profiles without reference to Benchmark"); # 190| } # 191|-> struct xccdf_item *item = xccdf_profile_parse(reader, benchmark); # 192| if (!xccdf_tailoring_add_profile(tailoring, XPROFILE(item))) { # 193| dW("Failed to add profile to tailoring while parsing!"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def72] openscap-1.4.4/src/XCCDF/tailoring.c:201:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ openscap-1.4.4/src/XCCDF/tailoring.c:126:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/tailoring.c: scope_hint: In function ‘xccdf_tailoring_parse’ # 199| xmlTextReaderConstLocalName(reader)); # 200| } # 201|-> xmlTextReaderRead(reader); # 202| } # 203| Error: GCC_ANALYZER_WARNING (CWE-401): [#def73] openscap-1.4.4/src/XCCDF/tailoring.c:399:22: warning[-Wanalyzer-malloc-leak]: leak of ‘xccdf_tailoring_new()’ openscap-1.4.4/src/XCCDF/tailoring.c:126:9: note: in expansion of macro ‘XCCDF_ASSERT_ELEMENT’ openscap-1.4.4/src/XCCDF/tailoring.c: scope_hint: In function ‘xccdf_tailoring_parse’ # 397| bool xccdf_tailoring_set_id(struct xccdf_tailoring *tailoring, const char* newval) # 398| { # 399|-> if (tailoring->id) # 400| free(tailoring->id); # 401| Error: GCC_ANALYZER_WARNING (CWE-401): [#def74] openscap-1.4.4/src/SCE/sce_engine.c:37: included_from: Included from here. openscap-1.4.4/src/common/debug_priv.h:47:37: warning[-Wanalyzer-malloc-leak]: leak of ‘env_values’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:63:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/SCE/sce_engine.c:433:25: note: in expansion of macro ‘dE’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:63:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/SCE/sce_engine.c:433:25: note: in expansion of macro ‘dE’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:63:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/SCE/sce_engine.c:433:25: note: in expansion of macro ‘dE’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:63:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/SCE/sce_engine.c:433:25: note: in expansion of macro ‘dE’ # 45| # 46| # 47|-> # define __dlprintf_wrapper(l, ...) __oscap_dlprintf (l, __FILE__, __PRETTY_FUNCTION__, __LINE__, 0, __VA_ARGS__) # 48| # 49| /** Error: GCC_ANALYZER_WARNING (CWE-401): [#def75] openscap-1.4.4/src/common/debug_priv.h:47:37: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(&pathbuf)’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:64:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:168:33: note: in expansion of macro ‘dD’ openscap-1.4.4/src/common/debug_priv.h:47:102: note: in definition of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:64:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:168:33: note: in expansion of macro ‘dD’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:64:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:168:33: note: in expansion of macro ‘dD’ openscap-1.4.4/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’ openscap-1.4.4/src/common/debug_priv.h:64:17: note: in expansion of macro ‘oscap_dlprintf’ openscap-1.4.4/src/OVAL/probes/unix/runlevel_probe.c:168:33: note: in expansion of macro ‘dD’ # 45| # 46| # 47|-> # define __dlprintf_wrapper(l, ...) __oscap_dlprintf (l, __FILE__, __PRETTY_FUNCTION__, __LINE__, 0, __VA_ARGS__) # 48| # 49| /** Error: GCC_ANALYZER_WARNING (CWE-401): [#def76] openscap-1.4.4/tests/API/SEAP/test_api_seap_spb.c:68:41: warning[-Wanalyzer-malloc-leak]: leak of ‘iov[2].iov_base’ # 66| # 67| if (iov[i].iov_base == NULL) { # 68|-> perror ("iov alloc"); # 69| return (2); # 70| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def77] openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:39:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’ # 37| oscap_assert(file != NULL); # 38| # 39|-> fseek(file, 0, SEEK_END); # 40| unsigned long len = ftell(file); # 41| fseek(file, 0, SEEK_SET); Error: GCC_ANALYZER_WARNING (CWE-401): [#def78] openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:40:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’ # 38| # 39| fseek(file, 0, SEEK_END); # 40|-> unsigned long len = ftell(file); # 41| fseek(file, 0, SEEK_SET); # 42| Error: GCC_ANALYZER_WARNING (CWE-401): [#def79] openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:41:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’ # 39| fseek(file, 0, SEEK_END); # 40| unsigned long len = ftell(file); # 41|-> fseek(file, 0, SEEK_SET); # 42| # 43| oscap_assert(buffer != NULL); Error: GCC_ANALYZER_WARNING (CWE-401): [#def80] openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:44:30: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:43:9: note: in expansion of macro ‘oscap_assert’ # 42| # 43| oscap_assert(buffer != NULL); # 44|-> *buffer = malloc(len + 1); # 45| oscap_assert(*buffer != NULL); # 46| Error: GCC_ANALYZER_WARNING (CWE-401): [#def81] openscap-1.4.4/tests/bz2/test_bz2_memory_source.c: scope_hint: In function ‘main’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:61:36: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:56:9: note: in expansion of macro ‘oscap_assert’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:43:9: note: in expansion of macro ‘oscap_assert’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:45:9: note: in expansion of macro ‘oscap_assert’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:45:9: note: in expansion of macro ‘oscap_assert’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:59:9: note: in expansion of macro ‘oscap_assert’ # 59| oscap_assert(buff_size != 0); # 60| # 61|-> struct oscap_source *src = oscap_source_new_from_memory(buffer, buff_size, "file.xml.bz2"); # 62| printf("SCAP TYPE: %s\n", oscap_document_type_to_string(oscap_source_get_scap_type(src))); # 63| oscap_assert(oscap_source_validate(src, NULL, NULL) == 0); Error: GCC_ANALYZER_WARNING (CWE-401): [#def82] openscap-1.4.4/tests/oscap_assert.h:30:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "rb")’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:43:9: note: in expansion of macro ‘oscap_assert’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:37:9: note: in expansion of macro ‘oscap_assert’ openscap-1.4.4/tests/bz2/test_bz2_memory_source.c:43:9: note: in expansion of macro ‘oscap_assert’ # 28| /* Unlike standard assert() macro this works even if NDEBUG is defined. */ # 29| #define oscap_assert(expr) \ # 30|-> if (!(expr)) { \ # 31| fprintf(stderr, "Assertion failed: %s, file %s, line %d, function %s.", #expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ # 32| abort(); \
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.92.0 |
| diffbase-analyzer-version-cppcheck | 2.19.1 |
| diffbase-analyzer-version-gcc | 16.0.0 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.0 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-190.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | openscap-1.4.4-0.20260112141555384747.pr2299.24.ge131aa1d9 |
| diffbase-store-results-to | /tmp/tmp7_ap8p63/openscap-1.4.4-0.20260112141555384747.pr2299.24.ge131aa1d9.tar.xz |
| diffbase-time-created | 2026-01-12 14:50:01 |
| diffbase-time-finished | 2026-01-12 15:03:26 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp7_ap8p63/openscap-1.4.4-0.20260112141555384747.pr2299.24.ge131aa1d9.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp7_ap8p63/openscap-1.4.4-0.20260112141555384747.pr2299.24.ge131aa1d9.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-190.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | openscap-1.4.4-0.20260112115410058871.main.21.g7a61a088a |
| store-results-to | /tmp/tmp82f6e6t1/openscap-1.4.4-0.20260112115410058871.main.21.g7a61a088a.tar.xz |
| time-created | 2026-01-12 14:35:36 |
| time-finished | 2026-01-12 14:49:31 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp82f6e6t1/openscap-1.4.4-0.20260112115410058871.main.21.g7a61a088a.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp82f6e6t1/openscap-1.4.4-0.20260112115410058871.main.21.g7a61a088a.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |