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
  1. sipa commented at 12:57 PM on February 18, 2012: member

    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.

  2. 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.
    a06113b0c5
  3. sipa referenced this in commit e0b8d459b1 on Feb 19, 2012
  4. sipa merged this on Feb 19, 2012
  5. sipa closed this on Feb 19, 2012

  6. coblee referenced this in commit de1a4d95b5 on Jul 17, 2012
  7. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 09:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me