From 3c82e9b9ccbee8a74f0f6feade12215be684fd9c Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 2 Jun 2011 15:55:26 -0500 Subject: sim: Make sure only PINs can be sent to EnterPin --- src/sim.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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); -- cgit v1.2.3