mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 16:14:23 +01:00
Use snprintf(...) instead of sprintf(...)
This commit is contained in:
committed by
Rusty Russell
parent
0f7b11bdc2
commit
9d9a9523d0
@@ -232,7 +232,7 @@ int main(int argc, char *argv[])
|
||||
* not need to have lightningd running in this case. */
|
||||
if (streq(method, "help") && format == HUMAN && argc >= 3) {
|
||||
char command[strlen(argv[2]) + sizeof("lightning-")];
|
||||
sprintf(command, "lightning-%s", argv[2]);
|
||||
snprintf(command, sizeof(command), "lightning-%s", argv[2]);
|
||||
exec_man(command);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user