summaryrefslogtreecommitdiffstats
path: root/src/sim.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2011-06-02 15:55:26 -0500
committerDenis Kenzior <denkenz@gmail.com>2011-06-02 15:56:18 -0500
commit3c82e9b9ccbee8a74f0f6feade12215be684fd9c (patch)
treeb6054902ab4f67116e406bb0fc161907ddc9935c /src/sim.c
parentea07cbfa1be3ce4573aa35c6ff06aca1384957d6 (diff)
downloadofono-3c82e9b9ccbee8a74f0f6feade12215be684fd9c.tar.bz2
sim: Make sure only PINs can be sent to EnterPin
Diffstat (limited to 'src/sim.c')
-rw-r--r--src/sim.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sim.c b/src/sim.c
index eb2c16c3..9e15f644 100644
--- 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);