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:
ea07cbf
)
sim: Make sure only PINs can be sent to EnterPin
author
Denis Kenzior
<denkenz@gmail.com>
Thu, 2 Jun 2011 20:55:26 +0000
(15:55 -0500)
committer
Denis Kenzior
<denkenz@gmail.com>
Thu, 2 Jun 2011 20:56:18 +0000
(15:56 -0500)
src/sim.c
patch
|
blob
|
history
diff --git
a/src/sim.c
b/src/sim.c
index
eb2c16c
..
9e15f64
100644
(file)
--- a/
src/sim.c
+++ b/
src/sim.c
@@
-806,6
+806,9
@@
static DBusMessage *sim_enter_pin(DBusConnection *conn, DBusMessage *msg,
if (type == OFONO_SIM_PASSWORD_NONE || type != sim->pin_type)
return __ofono_error_invalid_format(msg);
+ if (password_is_pin(type) == FALSE)
+ return __ofono_error_invalid_format(msg);
+
if (!__ofono_is_valid_sim_pin(pin, type))
return __ofono_error_invalid_format(msg);