Skip to content

Commit

Permalink
Fix incorrect sizeof in bign/params
Browse files Browse the repository at this point in the history
  • Loading branch information
agievich committed Sep 25, 2023
1 parent 1a02e9f commit 7d38de6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crypto/bign/bign_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ static size_t bignParamsDec_internal(bign_params* params, const octet der[],
err_t bignParamsEnc(octet der[], size_t* count, const bign_params* params)
{
size_t len;
if (!memIsValid(params, sizeof(params)) ||
if (!memIsValid(params, sizeof(bign_params)) ||
!memIsValid(count, O_PER_S) ||
!memIsNullOrValid(der, *count))
return ERR_BAD_INPUT;
Expand All @@ -708,7 +708,7 @@ err_t bignParamsEnc(octet der[], size_t* count, const bign_params* params)
err_t bignParamsDec(bign_params* params, const octet der[], size_t count)
{
size_t len;
if (!memIsValid(params, sizeof(params)) ||
if (!memIsValid(params, sizeof(bign_params)) ||
!memIsValid(der, count))
return ERR_BAD_INPUT;
len = bignParamsDec_internal(params, der, count);
Expand Down

0 comments on commit 7d38de6

Please sign in to comment.