mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 16:44:20 +01:00
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:
@@ -69,10 +69,10 @@ int main(int argc, char *argv[])
|
||||
if (!hex_decode(argv[1], strlen(argv[1]), &seed, sizeof(seed)))
|
||||
errx(1, "Invalid seed '%s' - need 256 hex bits", argv[1]);
|
||||
|
||||
if (!pubkey_from_hexstr(argv[2], &commitkey))
|
||||
if (!pubkey_from_hexstr(argv[2], strlen(argv[2]), &commitkey))
|
||||
errx(1, "Invalid commit key '%s'", argv[2]);
|
||||
|
||||
if (!pubkey_from_hexstr(argv[3], &finalkey))
|
||||
if (!pubkey_from_hexstr(argv[3], strlen(argv[3]), &finalkey))
|
||||
errx(1, "Invalid final key '%s'", argv[3]);
|
||||
|
||||
if (offer_anchor && min_confirms == 0)
|
||||
|
||||
Reference in New Issue
Block a user