projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
816b694
)
common: Fix parsing SS control string
author
Lucas De Marchi
<lucas.demarchi@profusion.mobi>
Wed, 22 May 2013 21:28:38 +0000
(18:28 -0300)
committer
Denis Kenzior
<denkenz@gmail.com>
Thu, 23 May 2013 02:40:19 +0000
(21:40 -0500)
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.
src/common.c
patch
|
blob
|
history
diff --git
a/src/common.c
b/src/common.c
index
94d70dd
..
17d1d58
100644
(file)
--- 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] == '*')