ASN1_item_verify_ctx(): Return -1 on fatal errors
Fixes #24575
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/24576)
(cherry picked from commit 8d380f85da
)
This commit is contained in:
parent
72bff68f6a
commit
711dd6ce37
1 changed files with 2 additions and 0 deletions
|
@ -202,10 +202,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_ASN1_LIB);
|
||||
ret = -1;
|
||||
goto err;
|
||||
}
|
||||
inll = inl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue