Skip to content

Commit

Permalink
replace remaining calls to memcpy with _oidc_memcpy
Browse files Browse the repository at this point in the history
Signed-off-by: Hans Zandbelt <[email protected]>
  • Loading branch information
zandbelt committed Feb 25, 2024
1 parent 3d6b067 commit bf7e6a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/jose.c
Original file line number Diff line number Diff line change
Expand Up @@ -1367,8 +1367,8 @@ static apr_byte_t _oidc_jwk_rsa_key_to_jwk(apr_pool_t *pool, EVP_PKEY *pkey, oid

*fp_len = key_spec.nlen + key_spec.elen;
*fp = apr_pcalloc(pool, *fp_len);
memcpy(*fp, key_spec.n, key_spec.nlen);
memcpy(*fp + key_spec.nlen, key_spec.e, key_spec.elen);
_oidc_memcpy(*fp, key_spec.n, key_spec.nlen);
_oidc_memcpy(*fp + key_spec.nlen, key_spec.e, key_spec.elen);

rv = TRUE;

Expand Down Expand Up @@ -1459,9 +1459,9 @@ static apr_byte_t _oidc_jwk_ec_key_to_jwk(apr_pool_t *pool, EVP_PKEY *pkey, oidc
apr_uint32_t b = htonl(crv);
*fp_len = sizeof(b) + ec_keyspec.xlen + ec_keyspec.ylen;
*fp = apr_pcalloc(pool, *fp_len);
memcpy(*fp, &b, sizeof(b));
memcpy(*fp + sizeof(b), ec_keyspec.x, ec_keyspec.xlen);
memcpy(*fp + sizeof(b) + ec_keyspec.xlen, ec_keyspec.y, ec_keyspec.ylen);
_oidc_memcpy(*fp, &b, sizeof(b));
_oidc_memcpy(*fp + sizeof(b), ec_keyspec.x, ec_keyspec.xlen);
_oidc_memcpy(*fp + sizeof(b) + ec_keyspec.xlen, ec_keyspec.y, ec_keyspec.ylen);

rv = TRUE;

Expand Down
2 changes: 1 addition & 1 deletion src/mod_auth_openidc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ static void oidc_store_userinfo_claims(request_rec *r, oidc_cfg *c, oidc_session
*/
#define OIDC_REFRESH_CACHE_TTL 30

/* needs to be larger than a few characters for cache compresson to work... */
/* needs to be larger than a few characters for cache compression to work... */
#define OIDC_REFRESH_LOCK_VALUE "needstobelargerthanafewcharacters"

/*
Expand Down

0 comments on commit bf7e6a3

Please sign in to comment.