提交 1876cc32 编写于 作者: B Bodo Möller

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).
上级 4e2a08dd
...@@ -504,7 +504,10 @@ int ssl3_mac(SSL *ssl, unsigned char *md, int send) ...@@ -504,7 +504,10 @@ int ssl3_mac(SSL *ssl, unsigned char *md, int send)
EVP_DigestFinal( &md_ctx,md,&md_size); EVP_DigestFinal( &md_ctx,md,&md_size);
for (i=7; i>=0; i--) for (i=7; i>=0; i--)
if (++seq[i]) break; {
++seq[i];
if (seq[i] != 0) break;
}
return(md_size); return(md_size);
} }
......
...@@ -643,7 +643,10 @@ printf("rec="); ...@@ -643,7 +643,10 @@ printf("rec=");
#endif #endif
for (i=7; i>=0; i--) for (i=7; i>=0; i--)
if (++seq[i]) break; {
++seq[i];
if (seq[i] != 0) break;
}
#ifdef TLS_DEBUG #ifdef TLS_DEBUG
{unsigned int z; for (z=0; z<md_size; z++) printf("%02X ",md[z]); printf("\n"); } {unsigned int z; for (z=0; z<md_size; z++) printf("%02X ",md[z]); printf("\n"); }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册