aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/a_verify.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/asn1/a_verify.c')
-rw-r--r--crypto/asn1/a_verify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/asn1/a_verify.c b/crypto/asn1/a_verify.c
index 9bf9bdd14ecc..66809bd6d2ff 100644
--- a/crypto/asn1/a_verify.c
+++ b/crypto/asn1/a_verify.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -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;