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

@@ -72,9 +72,9 @@ fail_free_secpctx:
return false;
}
bool pubkey_from_hexstr(const char *derstr, struct pubkey *key)
bool pubkey_from_hexstr(const char *derstr, size_t slen, struct pubkey *key)
{
size_t slen = strlen(derstr), dlen;
size_t dlen;
unsigned char der[65];
dlen = hex_data_size(slen);