Skip to content

Commit

Permalink
check result of cek = cjose_get_alloc()(cek_len) in jwe.c
Browse files Browse the repository at this point in the history
see: cisco#110

Signed-off-by: Hans Zandbelt <[email protected]>
  • Loading branch information
zandbelt committed Apr 5, 2022
1 parent cca0a2d commit 54d4494
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/jwe.c
Original file line number Diff line number Diff line change
Expand Up @@ -2064,6 +2064,10 @@ uint8_t *cjose_jwe_decrypt_multi(cjose_jwe_t *jwe, cjose_key_locator key_locator
{
cek_len = jwe->cek_len;
cek = cjose_get_alloc()(cek_len);
if (!cek) {
CJOSE_ERROR(err, CJOSE_ERR_NO_MEMORY);
return NULL;
}
memcpy(cek, jwe->cek, cek_len);
}
else
Expand Down

0 comments on commit 54d4494

Please sign in to comment.