diff --git a/src/XCCDF_POLICY/xccdf_policy_remediate.c b/src/XCCDF_POLICY/xccdf_policy_remediate.c index 5e4a0b1116..2ba2de7a77 100644 --- a/src/XCCDF_POLICY/xccdf_policy_remediate.c +++ b/src/XCCDF_POLICY/xccdf_policy_remediate.c @@ -790,7 +790,7 @@ static inline int _parse_ansible_fix(const char *fix_text, struct oscap_list *va int ovector[9]; const size_t fix_text_len = strlen(fix_text); - int start_offset = 0; + size_t start_offset = 0; while (true) { const int match = oscap_pcre_exec(re, fix_text, fix_text_len, start_offset, 0, ovector, sizeof(ovector) / sizeof(ovector[0])); diff --git a/src/common/oscap_pcre.c b/src/common/oscap_pcre.c index 3b3a830556..3ba597bdd3 100644 --- a/src/common/oscap_pcre.c +++ b/src/common/oscap_pcre.c @@ -43,9 +43,9 @@ struct oscap_pcre { }; -static inline int _oscap_pcre_opts_to_pcre(oscap_pcre_options_t opts) +static inline uint32_t _oscap_pcre_opts_to_pcre(oscap_pcre_options_t opts) { - int res = 0; + uint32_t res = 0; if (opts & OSCAP_PCRE_OPTS_UTF8) res |= PCRE2_UTF; if (opts & OSCAP_PCRE_OPTS_MULTILINE) @@ -131,7 +131,7 @@ void oscap_pcre_set_match_limit_recursion(oscap_pcre_t *opcre, unsigned long lim } int oscap_pcre_exec(const oscap_pcre_t *opcre, const char *subject, - int length, int startoffset, oscap_pcre_options_t options, + size_t length, size_t startoffset, oscap_pcre_options_t options, int *ovector, int ovecsize) { int rc = 0; diff --git a/src/common/oscap_pcre.h b/src/common/oscap_pcre.h index 839b6d68b6..b9f54d97d7 100644 --- a/src/common/oscap_pcre.h +++ b/src/common/oscap_pcre.h @@ -73,7 +73,7 @@ oscap_pcre_t* oscap_pcre_compile(const char *pattern, oscap_pcre_options_t optio * negative error code on failure */ int oscap_pcre_exec(const oscap_pcre_t *opcre, const char *subject, - int length, int startoffset, oscap_pcre_options_t options, + size_t length, size_t startoffset, oscap_pcre_options_t options, int *ovector, int ovecsize); /**