mirror of
https://github.com/tmux/tmux.git
synced 2024-12-12 17:38:48 +00:00
Check if args_strtonum argument is NULL or not a string, from Anindya
Mukherjee.
This commit is contained in:
parent
3b7dae9a53
commit
2cad9a6af8
@ -831,6 +831,12 @@ args_strtonum(struct args *args, u_char flag, long long minval,
|
||||
return (0);
|
||||
}
|
||||
value = TAILQ_LAST(&entry->values, args_values);
|
||||
if (value == NULL ||
|
||||
value->type != ARGS_STRING ||
|
||||
value->string == NULL) {
|
||||
*cause = xstrdup("missing");
|
||||
return (0);
|
||||
}
|
||||
|
||||
ll = strtonum(value->string, minval, maxval, &errstr);
|
||||
if (errstr != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user