Skip to content

Commit

Permalink
Merge pull request #623 from dongbeiouba/fix/coverity_memory
Browse files Browse the repository at this point in the history
Fix coverity issues, CID 471315 and 356192
  • Loading branch information
InfoHunter authored Jun 23, 2024
2 parents 124b751 + 16b3526 commit fae377a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crypto/dh/dh_pmeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ static int pkey_dh_derive(EVP_PKEY_CTX *ctx, unsigned char *key,
else if (dctx->kdf_type == EVP_PKEY_DH_KDF_X9_42) {

unsigned char *Z = NULL;
size_t Zlen = 0;
int Zlen = 0;
if (!dctx->kdf_outlen || !dctx->kdf_oid)
return 0;
if (key == NULL) {
Expand Down
4 changes: 3 additions & 1 deletion crypto/ec/ec_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,10 @@ EC_POINTS *EC_POINTS_new(const EC_GROUP *group, int count)

for (i = 0; i < count; i++) {
point = EC_POINT_new(group);
if (point == NULL)
if (point == NULL) {
EC_POINTS_free(ret);
return NULL;
}

ret->items[i] = point;
}
Expand Down

0 comments on commit fae377a

Please sign in to comment.