From: Tim Hudson Date: Sun, 21 Sep 2014 11:54:31 +0000 (+1000) Subject: Fixed error introduced in commit f2be92b94dad3c6cbdf79d99a324804094cf1617 X-Git-Tag: OpenSSL_0_9_8zc~16 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cf4b01a766f5e0f5a7e270c43aac76defb972ebd;p=oweals%2Fopenssl.git Fixed error introduced in commit f2be92b94dad3c6cbdf79d99a324804094cf1617 that fixed PR#3450 where an existing cast masked an issue when i was changed from int to long in that commit Picked up on z/linux (s390) where sizeof(int)!=sizeof(long) Reviewed-by: Rich Salz Reviewed-by: Matt Caswell (cherry picked from commit b5ff559ff90124c6fd53bbb49dae5edb4e821e0a) --- diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 99de1bf608..4828937566 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -1487,6 +1487,7 @@ int ssl3_get_key_exchange(SSL *s) if (pkey->type == EVP_PKEY_RSA) { int num; + unsigned int size; j=0; q=md_buf; @@ -1499,9 +1500,9 @@ int ssl3_get_key_exchange(SSL *s) EVP_DigestUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_DigestUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_DigestUpdate(&md_ctx,param,param_len); - EVP_DigestFinal_ex(&md_ctx,q,(unsigned int *)&i); - q+=i; - j+=i; + EVP_DigestFinal_ex(&md_ctx,q,&size); + q+=size; + j+=size; } i=RSA_verify(NID_md5_sha1, md_buf, j, p, n, pkey->pkey.rsa);