mirror of
https://github.com/tmux/tmux.git
synced 2024-11-17 18:08:51 +00:00
Check if args_strtonum argument is NULL or not a string, from Anindya
Mukherjee.
This commit is contained in:
parent
af1496b300
commit
006a529db1
@ -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