git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
59b1b18
)
Merge pull request #863 from sipa/bn2mpifix
author
Pieter Wuille
<pieter.wuille@gmail.com>
Sun, 19 Feb 2012 17:22:11 +0000 (09:22 -0800)
committer
Pieter Wuille
<pieter.wuille@gmail.com>
Sun, 19 Feb 2012 17:22:11 +0000 (09:22 -0800)
Workaround for BN_bn2mpi reading/writing out of bounds
src/bignum.h
patch
|
blob
|
history
diff --git
a/src/bignum.h
b/src/bignum.h
index
4143f60
..
a750025
100644
(file)
--- a/
src/bignum.h
+++ b/
src/bignum.h
@@
-243,7
+243,7
@@
public:
std::vector<unsigned char> getvch() const
{
unsigned int nSize = BN_bn2mpi(this, NULL);
- if (nSize < 4)
+ if (nSize <= 4)
return std::vector<unsigned char>();
std::vector<unsigned char> vch(nSize);
BN_bn2mpi(this, &vch[0]);