Hi!

There is a problem in openssl-0.9.7c in asm version of bn_div_words 
function for x86_64 cpus (file crypto/bn/asm/x86_64-gcc.c). This could 
lead to arithmetic exceptions and incorrect work.

This patch should deal with the problem:


diff -ur openssl-0.9.7c/crypto/bn/asm/x86_64-gcc.c 
/tmp/openssl-0.9.7c/crypto/bn/asm/x86_64-gcc.c
--- openssl-0.9.7c/crypto/bn/asm/x86_64-gcc.c   2002-12-14 23:45:35.000000000 +0300
+++ openssl-0.9.7c/crypto/bn/asm/x86_64-gcc.c   2004-02-02 16:06:15.079676792 +0300
@@ -142,7 +142,7 @@
 BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
 {      BN_ULONG ret,waste;
 
-       asm ("divq      %3"
+       asm ("divq      %4"
                : "=a"(ret),"=d"(waste)
                : "a"(l),"d"(h),"g"(d)
                : "cc");
 

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to