diff options
author | Pieter Wuille <pieter@wuille.net> | 2021-07-14 10:02:02 -0700 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2021-07-14 14:43:45 -0700 |
commit | e4ffb44716bb7a7b9f0a5d70ac07058632234370 (patch) | |
tree | b658b1afefbcbe30b42d819c59dd5172f64dc79b /src/secp256k1/contrib/lax_der_privatekey_parsing.c | |
parent | 531c2b7c04898f5a2097f44e8c12bfb2f53aaf9b (diff) | |
parent | c020cbaa5c8e9e61b2b8efd8dc09be743fcd4273 (diff) |
Update secp256k1 subtree to latest upstream + adapt API
The new schnorrsig API requires changing a few arguments.
Diffstat (limited to 'src/secp256k1/contrib/lax_der_privatekey_parsing.c')
-rw-r--r-- | src/secp256k1/contrib/lax_der_privatekey_parsing.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/secp256k1/contrib/lax_der_privatekey_parsing.c b/src/secp256k1/contrib/lax_der_privatekey_parsing.c index 429760fbb6..a1b8200079 100644 --- a/src/secp256k1/contrib/lax_der_privatekey_parsing.c +++ b/src/secp256k1/contrib/lax_der_privatekey_parsing.c @@ -5,7 +5,6 @@ ***********************************************************************/ #include <string.h> -#include <secp256k1.h> #include "lax_der_privatekey_parsing.h" @@ -45,7 +44,7 @@ int ec_privkey_import_der(const secp256k1_context* ctx, unsigned char *out32, co if (end < privkey+2 || privkey[0] != 0x04 || privkey[1] > 0x20 || end < privkey+2+privkey[1]) { return 0; } - memcpy(out32 + 32 - privkey[1], privkey + 2, privkey[1]); + if (privkey[1]) memcpy(out32 + 32 - privkey[1], privkey + 2, privkey[1]); if (!secp256k1_ec_seckey_verify(ctx, out32)) { memset(out32, 0, 32); return 0; |