mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
hsmtool: Fix argc check on getcodexsecret
This caused a segmentation fault when calling `getcodexsecret` without id. Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com> Changelog-Fixed: Hsmtool: Fix segmentation fault when calling `getcodexsecret` without id.
This commit is contained in:
parent
194dd2bb7d
commit
9d40a165a0
1 changed files with 2 additions and 2 deletions
|
@ -788,7 +788,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if(streq(method, "getcodexsecret")) {
|
||||
if (argc < 2)
|
||||
if (argc < 4)
|
||||
show_usage(argv[0]);
|
||||
return make_codexsecret(argv[2], argv[3]);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue