From 9117b9d17abadc372a2ab7b64f42566a6f09ba41 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Mon, 30 Nov 2009 13:53:42 +0000 Subject: [PATCH] PR: 2118 Submitted by: Mounir IDRASSI Approved by: steve@openssl.org Check return value of ECDSA_sign() properly. --- crypto/ec/ec_pmeth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/ec/ec_pmeth.c b/crypto/ec/ec_pmeth.c index 2a024bd48a..f433076ca1 100644 --- a/crypto/ec/ec_pmeth.c +++ b/crypto/ec/ec_pmeth.c @@ -143,7 +143,7 @@ static int pkey_ec_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, ret = ECDSA_sign(type, tbs, tbslen, sig, &sltmp, ec); - if (ret < 0) + if (ret <= 0) return ret; *siglen = (size_t)sltmp; return 1; -- 2.25.1