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

@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
if (!testnet)
errx(1, "Private key '%s' not on testnet!", argv[5]);
if (!pubkey_from_hexstr(argv[6], &outpubkey))
if (!pubkey_from_hexstr(argv[6], strlen(argv[6]), &outpubkey))
errx(1, "Invalid bitcoin pubkey '%s'", argv[6]);
/* Get pubkeys */