The branch OpenSSL_1_1_1-stable has been updated
       via  f9f2e609db4de8d1f2022189a99c8277c3f6289d (commit)
      from  e78f2a8f269a4dcf820ca994e2b89b77972d79e1 (commit)


- Log -----------------------------------------------------------------
commit f9f2e609db4de8d1f2022189a99c8277c3f6289d
Author: William Brawner <m...@wbrawner.com>
Date:   Sun Apr 5 09:39:41 2020 -0700

    Ensure ECDSA_size always returns >= 0
    
    Fixes #10484
    
    Signed-off-by: William Brawner <m...@wbrawner.com>
    
    Reviewed-by: Nicola Tuveri <nic....@gmail.com>
    Reviewed-by: Matt Caswell <m...@openssl.org>
    Reviewed-by: Tomas Mraz <tm...@fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/11472)

-----------------------------------------------------------------------

Summary of changes:
 crypto/ec/ec_asn1.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c
index 336afc989d..831b74ce6c 100644
--- a/crypto/ec/ec_asn1.c
+++ b/crypto/ec/ec_asn1.c
@@ -1297,5 +1297,7 @@ int ECDSA_size(const EC_KEY *r)
     i = i2d_ASN1_INTEGER(&bs, NULL);
     i += i;                     /* r and s */
     ret = ASN1_object_size(1, i, V_ASN1_SEQUENCE);
+    if (ret < 0)
+        return 0;
     return ret;
 }

Reply via email to