Skip to content

Commit

Permalink
use _oidc_strlen over strlen consistently
Browse files Browse the repository at this point in the history
Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
  • Loading branch information
zandbelt committed Sep 23, 2024
1 parent eafae0e commit 93bdf9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ static size_t oidc_http_response_header(char *buffer, size_t size, size_t nitems
while (*value == ' ')
value++;
/* remove trailing /r/n */
i = strlen(value) - 1;
i = _oidc_strlen(value) - 1;
while ((value[i] == '\r') || (value[i] == '\n'))
value[i--] = '\0';
}
Expand Down Expand Up @@ -810,7 +810,7 @@ static apr_byte_t oidc_http_request(request_rec *r, const char *url, const char
}

if (dpop != NULL) {
oidc_debug(r, "appending DPoP header (len=%d)", (int)strlen(dpop));
oidc_debug(r, "appending DPoP header (len=%d)", (int)_oidc_strlen(dpop));
h_list = curl_slist_append(h_list, apr_psprintf(r->pool, "%s: %s", OIDC_HTTP_HDR_DPOP, dpop));
}

Expand Down
2 changes: 1 addition & 1 deletion src/proto/dpop.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ apr_byte_t oidc_proto_dpop_create(request_rec *r, oidc_cfg_t *cfg, const char *u

if (access_token != NULL) {
if (oidc_jose_hash_and_base64url_encode(r->pool, OIDC_JOSE_ALG_SHA256, access_token,
strlen(access_token), &ath, &err) == FALSE) {
_oidc_strlen(access_token), &ath, &err) == FALSE) {
oidc_error(r, "oidc_jose_hash_and_base64url_encode failed: %s", oidc_jose_e2s(r->pool, err));
goto end;
}
Expand Down

0 comments on commit 93bdf9d

Please sign in to comment.