summaryrefslogtreecommitdiffstats
path: root/src/sim.c
diff options
context:
space:
mode:
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);