When OpenSSL's BN_bn2mpi is passed a buffer of size 4, valgrind reports reading/writing one byte past it. I am unable to find evidence of this behaviour in BN_bn2mpi's source code, so it may be a spurious warning. However, this change is harmless, as only the bignum with value 0 results in an mpi serialization of size 4.
Workaround for BN_bn2mpi reading/writing out of bounds #863
pull sipa wants to merge 1 commits into bitcoin:master from sipa:bn2mpifix changing 1 files +1 −1-
sipa commented at 12:57 PM on February 18, 2012: member
-
a06113b0c5
Workaround for BN_bn2mpi reading/writing out of bounds
When OpenSSL's BN_bn2mpi is passed a buffer of size 4, valgrind reports reading/writing one byte past it. I am unable to find evidence of this behaviour in BN_bn2mpi's source code, so it may be a spurious warning. However, this change is harmless, as only the bignum with value 0 results in an mpi serialization of size 4.
- sipa referenced this in commit e0b8d459b1 on Feb 19, 2012
- sipa merged this on Feb 19, 2012
- sipa closed this on Feb 19, 2012
- coblee referenced this in commit de1a4d95b5 on Jul 17, 2012
- DrahtBot locked this on Sep 8, 2021
Contributors