mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 09:34:24 +01:00
plugins: use stricter parsing for option values
also: convert the stored int value from 'int' to 's64' atoi fails silently, returning a zero. instead we use the more robust strtoll which will allow us fail with an error. we also make the parsing for bools stricter, only allowing plausibly boolean values to parse.
This commit is contained in:
committed by
Rusty Russell
parent
d19cddf00f
commit
cac5a0cd1d
@@ -114,7 +114,7 @@ struct plugins {
|
||||
*/
|
||||
struct plugin_opt_value {
|
||||
char *as_str;
|
||||
int *as_int;
|
||||
s64 *as_int;
|
||||
bool *as_bool;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user