projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
'make update'
[oweals/openssl.git]
/
crypto
/
bn
/
bn_mul.c
diff --git
a/crypto/bn/bn_mul.c
b/crypto/bn/bn_mul.c
index b4ed7e23e62daa6a0864c2e59f3117c011960cf1..e0c8ade99652daeb178b85ad82f4bfeaa7c35254 100644
(file)
--- a/
crypto/bn/bn_mul.c
+++ b/
crypto/bn/bn_mul.c
@@
-66,7
+66,7
@@
#include "cryptlib.h"
#include "bn_lcl.h"
#include "cryptlib.h"
#include "bn_lcl.h"
-#if defined(
NO_ASM)
+#if defined(
OPENSSL_NO_ASM) || !defined(__i386) /* Assembler implementation exists only for x86 */
/* Here follows specialised variants of bn_add_words() and
bn_sub_words(). They have the property performing operations on
arrays of different sizes. The sizes of those arrays is expressed through
/* Here follows specialised variants of bn_add_words() and
bn_sub_words(). They have the property performing operations on
arrays of different sizes. The sizes of those arrays is expressed through
@@
-1110,7
+1110,13
@@
void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb)
}
rr= &(r[na]);
}
rr= &(r[na]);
- rr[0]=bn_mul_words(r,a,na,b[0]);
+ if (nb <= 0)
+ {
+ (void)bn_mul_words(r,a,na,0);
+ return;
+ }
+ else
+ rr[0]=bn_mul_words(r,a,na,b[0]);
for (;;)
{
for (;;)
{