From 691401fc53cc14cd98ac885e842e1e8370280abc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bodo=20M=C3=B6ller?= Date: Sat, 15 Jan 2000 20:24:12 +0000 Subject: [PATCH] RAND_bytes's return values is 0 for an error, not -1. --- crypto/evp/p_seal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/evp/p_seal.c b/crypto/evp/p_seal.c index 7966545e21..e372f138c7 100644 --- a/crypto/evp/p_seal.c +++ b/crypto/evp/p_seal.c @@ -73,7 +73,7 @@ int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek, int i; if (npubk <= 0) return(0); - if (RAND_bytes(key,EVP_MAX_KEY_LENGTH) == -1) return(0); + if (RAND_bytes(key,EVP_MAX_KEY_LENGTH) <= 0) return(0); if (type->iv_len > 0) RAND_bytes(iv,type->iv_len); -- 2.25.1