mirror of git://git.sysmocom.de/ofono
common: Fix parsing SS control string
It's not possible to be both greater than '9' and less than '0'. This would lead to accepting things like "#$33#" as activation and "*$33#" as deactivation, even though the string makes no sense.
This commit is contained in:
parent
816b6946f7
commit
53a0fa8c7c
|
@ -554,7 +554,7 @@ gboolean parse_ss_control_string(char *str, int *ss_type,
|
|||
|
||||
cur = 1;
|
||||
|
||||
if (str[1] != '*' && str[1] != '#' && str[1] > '9' && str[1] < '0')
|
||||
if (str[1] != '*' && str[1] != '#' && (str[1] > '9' || str[1] < '0'))
|
||||
goto out;
|
||||
|
||||
if (str[0] == '#' && str[1] == '*')
|
||||
|
|
Loading…
Reference in New Issue