Skip to content

Commit

Permalink
fix memory allocation check (typo) in jwk.c
Browse files Browse the repository at this point in the history
closes https://github.com/OpenIDC/cjose/security/code-scanning/2

Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
  • Loading branch information
zandbelt committed Apr 29, 2024
1 parent d612036 commit 690d426
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Release Notes #

* fix memory allocation check (typo) in jwk.c (https://github.com/OpenIDC/cjose/security/code-scanning/2)

<a name="v0.6.2.3"></a>
## [v0.6.2.3](https://github.com/OpenIDC/cjose/compare/v0.6.2.2...v0.6.2.3) (2024-04-24)
* disable RSA PKCS 1.5 by default ((https://github.com/OpenIDC/cjose/pull/22); thanks @thalman
Expand Down
2 changes: 1 addition & 1 deletion src/jwk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1673,7 +1673,7 @@ static bool _cjose_jwk_evp_key_from_ec_key(const cjose_jwk_t *jwk, EVP_PKEY **ke

// create a blank EVP_PKEY
*key = EVP_PKEY_new();
if (NULL == key)
if (NULL == *key)
{
CJOSE_ERROR(err, CJOSE_ERR_CRYPTO);
goto _cjose_jwk_evp_key_from_ec_key_fail;
Expand Down

0 comments on commit 690d426

Please sign in to comment.