Skip to content

Commit

Permalink
ASN1_item_verify_ctx(): Return -1 on fatal errors
Browse files Browse the repository at this point in the history
Fixes openssl#24575

Reviewed-by: Tom Cosgrove <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Dmitry Belyavskiy <[email protected]>
(Merged from openssl#24576)

(cherry picked from commit 8d380f8)
  • Loading branch information
t8m committed Jun 21, 2024
1 parent ba389a5 commit ae1e12e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/asn1/a_verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,12 @@ int ASN1_item_verify_ctx(const ASN1_ITEM *it, const X509_ALGOR *alg,
inl = ASN1_item_i2d(data, &buf_in, it);
if (inl <= 0) {
ERR_raise(ERR_LIB_ASN1, ERR_R_INTERNAL_ERROR);
ret = -1;
goto err;
}
if (buf_in == NULL) {
ERR_raise(ERR_LIB_ASN1, ERR_R_MALLOC_FAILURE);
ret = -1;
goto err;
}
inll = inl;
Expand Down

0 comments on commit ae1e12e

Please sign in to comment.