Skip to content

Commit

Permalink
Print the defective pattern if pcre_compile fails
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-cerny committed Jan 18, 2019
1 parent d59f1a6 commit bfcb4d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OVAL/results/oval_cmp_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ static oval_result_t strregcomp(const char *pattern, const char *test_str)

re = pcre_compile(pattern, PCRE_UTF8, &err, &errofs, NULL);
if (re == NULL) {
dE("Unable to compile regex pattern, "
"pcre_compile() returned error (offset: %d): '%s'.\n", errofs, err);
dE("Unable to compile regex pattern '%s', "
"pcre_compile() returned error (offset: %d): '%s'.\n", pattern, errofs, err);
return OVAL_RESULT_ERROR;
}

Expand Down

0 comments on commit bfcb4d8

Please sign in to comment.