Skip to content

Commit c811c2a

Browse files
committed
Fix (null) string when XCCDF value not set
Similar to 793475c assign an emtpy string to XCCDF value if xccdf_value_binding_get_value returns NULL.
1 parent 4e9019a commit c811c2a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/SCE/sce_engine.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,9 @@ xccdf_test_result_type_t sce_engine_eval_rule(struct xccdf_policy *policy, const
425425
if (value == NULL)
426426
{
427427
value = xccdf_value_binding_get_value(binding);
428+
if (value == NULL) {
429+
value = "";
430+
}
428431
}
429432
xccdf_operator_t operator = xccdf_value_binding_get_operator(binding);
430433

0 commit comments

Comments
 (0)