Skip to content

Commit

Permalink
Fixes (squash before merging)
Browse files Browse the repository at this point in the history
  • Loading branch information
evgenyz committed Aug 29, 2023
1 parent 367bee2 commit d5f7b6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/OVAL/probes/unix/linux/rpmverifyfile_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ static int _compare_file_with_current_file(oval_operation_t file_op, const char
}
int pcre_ret = oscap_pcre_exec(re, current_file, strlen(current_file), 0, 0, NULL, 0);
oscap_pcre_free(re);
if (pcre_ret == 0) {
if (pcre_ret > OSCAP_PCRE_ERR_NOMATCH) {
/* match */
*result_file = oscap_strdup(current_file);
} else if (pcre_ret == -1) {
} else if (pcre_ret == OSCAP_PCRE_ERR_NOMATCH) {
/* no match */
ret = 1;
goto cleanup;
Expand Down
2 changes: 1 addition & 1 deletion src/common/oscap_pcre.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ oscap_pcre_t* oscap_pcre_compile(const char *pattern, oscap_pcre_options_t optio
}
#else
res->re_extra = NULL;
res->re = pcre_compile(pattern, _oscap_pcre_opts_to_pcre(options), errptr, erroffset, tableptr);
res->re = pcre_compile(pattern, _oscap_pcre_opts_to_pcre(options), errptr, erroffset, NULL);
#endif
if (res->re == NULL) {
free(res);
Expand Down

0 comments on commit d5f7b6a

Please sign in to comment.