diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2010-05-22 00:40:38 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2010-05-22 00:40:38 +0000 |
commit | ae7c67cace564bb1a3cc736dad93419d94e97f42 (patch) | |
tree | f60d1948e96c5d68025dc1f19ec928859ba1746c /engines | |
parent | ca96d389816a3d962473c7eed497f87282670f0e (diff) |
PR: 2254
Submitted by: Ger Hobbelt <ger@hobbelt.com>
Approved by: steve@openssl.org
Check for <= 0 i2d return value.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/ccgost/gost94_keyx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/ccgost/gost94_keyx.c b/engines/ccgost/gost94_keyx.c index a183edbe8b..624be586a5 100644 --- a/engines/ccgost/gost94_keyx.c +++ b/engines/ccgost/gost94_keyx.c @@ -177,7 +177,7 @@ int pkey_GOST94cp_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, ASN1_OBJECT_free(gkt->key_agreement_info->cipher); gkt->key_agreement_info->cipher = OBJ_nid2obj(param->nid); *outlen = i2d_GOST_KEY_TRANSPORT(gkt,out?&out:NULL); - if (*outlen == 0) + if (*outlen <= 0) { GOSTerr(GOST_F_PKEY_GOST94CP_ENCRYPT,GOST_R_ERROR_PACKING_KEY_TRANSPORT_INFO); goto err; |