From: Bodo Möller Date: Tue, 3 Apr 2001 13:46:36 +0000 (+0000) Subject: This change should be suitable as a workaround for the Solaris x86 X-Git-Tag: OpenSSL_0_9_6a~11 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9a22ce66c94294ee56d99870a47022ae0e067203;p=oweals%2Fopenssl.git This change should be suitable as a workaround for the Solaris x86 compiler bug reported in <01032110293775.22278@weba3.iname.net> (the '++seq[i]' condition is evaluated as 256 rather than 0 when the previous value is 255). --- diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index 012a4b8740..9f52c39ca9 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -504,7 +504,10 @@ int ssl3_mac(SSL *ssl, unsigned char *md, int send) EVP_DigestFinal( &md_ctx,md,&md_size); for (i=7; i>=0; i--) - if (++seq[i]) break; + { + ++seq[i]; + if (seq[i] != 0) break; + } return(md_size); } diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c index 0d34357eb4..d10a23af8e 100644 --- a/ssl/t1_enc.c +++ b/ssl/t1_enc.c @@ -572,7 +572,10 @@ printf("rec="); #endif for (i=7; i>=0; i--) - if (++seq[i]) break; + { + ++seq[i]; + if (seq[i] != 0) break; + } #ifdef TLS_DEBUG {unsigned int z; for (z=0; z