Skip to content

Commit 3170d46

Browse files
committed
Check if tailoring is NULL
1 parent c8fe6c6 commit 3170d46

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

utils/oscap-info.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,10 @@ static int app_info_single_ds_one_profile(struct ds_stream_index_iterator* sds_i
681681
ret = _handle_xccdf_benchmark_profile(bench, action, profile_suffix, filename, &profile_found);
682682
} else if (oscap_source_get_scap_type(xccdf_source) == OSCAP_DOCUMENT_XCCDF_TAILORING) {
683683
struct xccdf_tailoring *tailoring = xccdf_tailoring_import_source(xccdf_source, NULL);
684+
if (!tailoring) {
685+
ret = OSCAP_ERROR;
686+
goto cleanup;
687+
}
684688
ret = _handle_xccdf_tailoring_profile(tailoring, action, profile_suffix, filename, session, stream, id, &profile_found);
685689
}
686690
if (ret != OSCAP_OK) {

0 commit comments

Comments
 (0)