summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2013-05-22 18:28:38 -0300
committerDenis Kenzior <denkenz@gmail.com>2013-05-22 21:40:19 -0500
commit53a0fa8c7cd5c108613a09004c906c2cc7420b86 (patch)
tree2a3679c5d253973dd1390e488fd2d5af1cd395c3 /src
parent816b6946f7c212cba4504d8ebaf0d5ca21fd9ba4 (diff)
downloadofono-53a0fa8c7cd5c108613a09004c906c2cc7420b86.tar.bz2
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.
Diffstat (limited to 'src')
-rw-r--r--src/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common.c b/src/common.c
index 94d70dd9..17d1d58a 100644
--- a/src/common.c
+++ b/src/common.c
@@ -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] == '*')