From: Richard Levitte Date: Wed, 27 Jan 2010 01:18:21 +0000 (+0000) Subject: size_t doesn't compare less than zero... X-Git-Tag: OpenSSL-fips-2_0-rc1~1307 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c8c07be883818805f01b51ce7b7410a3aee5fc90;p=oweals%2Fopenssl.git size_t doesn't compare less than zero... --- diff --git a/engines/ccgost/gost94_keyx.c b/engines/ccgost/gost94_keyx.c index 624be586a5..a183edbe8b 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;