projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b195b5
)
Add bn_dup_expand() comment from the main branch explaining that
author
Bodo Möller
<bodo@openssl.org>
Thu, 25 Jul 2002 12:14:41 +0000
(12:14 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Thu, 25 Jul 2002 12:14:41 +0000
(12:14 +0000)
bn_dup_expand() is broken.
[No need to fix this in 0.9.7-stable, it is just an unused internal
function.]
crypto/bn/bn_lib.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bn_lib.c
b/crypto/bn/bn_lib.c
index a016cb7f5379776658357367bd86d5383e297392..8abe095af28e3797f72a8230fd5b82183cb6f44b 100644
(file)
--- a/
crypto/bn/bn_lib.c
+++ b/
crypto/bn/bn_lib.c
@@
-397,6
+397,12
@@
BIGNUM *bn_dup_expand(const BIGNUM *b, int words)
{
BIGNUM *r = NULL;
+ /* This function does not work if
+ * words <= b->dmax && top < words
+ * because BN_dup() does not preserve 'dmax'!
+ * (But bn_dup_expand() is not used anywhere yet.)
+ */
+
if (words > b->dmax)
{
BN_ULONG *a = bn_expand_internal(b, words);