Skip to content

Commit

Permalink
fix double-free for OpenSSL<3.x (for Github archs action)
Browse files Browse the repository at this point in the history
run Github archs action on ubuntu-latest

Signed-off-by: Hans Zandbelt <[email protected]>
  • Loading branch information
zandbelt committed Mar 3, 2023
1 parent d5fa6b7 commit d86b913
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/archs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
#test/check_cache.c:74:F:core:test_cache_redis:0: Assertion 'value == ((void *)0)' failed: value == 0x4006a290, ((void *)0) == 0
#test/check_nginx.c:102:E:core:test_request_context:0: (after this point) Test timeout expired
#test/check_nginx.c:114:E:core:test_nginx_http_response_set:0: (after this point) Received signal 11 (Segmentation fault)
# - arch: armv7
# distro: ubuntu20.04
- arch: armv7
distro: ubuntu-latest
- arch: aarch64
distro: ubuntu20.04
distro: ubuntu-latest
- arch: ppc64le
distro: ubuntu20.04
distro: ubuntu-latest
- arch: s390x
distro: ubuntu20.04
distro: ubuntu-latest

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions src/jose.c
Original file line number Diff line number Diff line change
Expand Up @@ -1649,10 +1649,12 @@ _oauth2_jose_options_jwk_set_rsa_key(oauth2_log_t *log, EVP_PKEY *pkey,
rv = _oauth2_jose_verify_options_jwk_add_jwk(log, jwk, params, verify);

end:
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
if (rsa_n)
BN_clear_free(rsa_n);
if (rsa_e)
BN_clear_free(rsa_e);
#endif
if (key_spec.n)
oauth2_mem_free(key_spec.n);
if (key_spec.e)
Expand Down

0 comments on commit d86b913

Please sign in to comment.