bitcoin: add len arg to pubkey conversion function.

Our json parser doesn't give nul-terminated strings.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-01-22 06:41:47 +10:30
parent 79e1c9bb62
commit cf547d491b
7 changed files with 9 additions and 9 deletions

View File

@@ -142,7 +142,7 @@ int main(int argc, char *argv[])
if (change) {
struct pubkey change_key;
if (!pubkey_from_hexstr(argv[4], &change_key))
if (!pubkey_from_hexstr(argv[4], strlen(argv[4]), &change_key))
errx(1, "Invalid change key %s", argv[3]);
redeemscript = bitcoin_redeem_single(anchor, &change_key);