Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rustyrussell/pettycoin
base: 964043b4be84
Choose a base ref
...
head repository: rustyrussell/pettycoin
compare: 10e7c7705003
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Aug 15, 2014

  1. caller_do_bn_init.patch

    Problem:
    
    raw_decode_base_n leaks if we allocate the bignum with BN_new(),
    because BN_init() is called on an initialized BIGNUM.
    
    Fix:
    
    raw_decode_base58 no longer calls BN_init() and the caller has to call
    BN_init() if needed.
    
    Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    arhuaco authored and rustyrussell committed Aug 15, 2014
    Configuration menu
    Copy the full SHA
    243822f View commit details
    Browse the repository at this point in the history
  2. Add function raw_decode_base_n

    Generalize raw_decode_base58 and make raw_decode_base58 depend on
    raw_decode_base_n.
    
    This will make it decoding from other bases easier in the future.
    
    Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    arhuaco authored and rustyrussell committed Aug 15, 2014
    Configuration menu
    Copy the full SHA
    783aa38 View commit details
    Browse the repository at this point in the history
  3. Add a test for raw_decode_base_n with n=16

    This is the first time that we test raw_decode_base_* with a BIGNUM that
    is allocated with BN_new. This function was leaking before and it doesn not
    leak now that raw_decode_base_n does not call BN_init (Fixed in previous patch).
    
    In other workds, this call sequence works well now:
    
      bn_priv = BN_new();
      assert(raw_decode_base_n(bn_priv, priv_b16, strlen(priv_b16), 16));
    
    Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    arhuaco authored and rustyrussell committed Aug 15, 2014
    Configuration menu
    Copy the full SHA
    10e7c77 View commit details
    Browse the repository at this point in the history