summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-10-30 15:54:32 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-10-30 15:54:32 -0500
commit26804de94b655618b9dd7d70ab5d4c3ea8d36bd0 (patch)
treeccc26dee005441ecd0c13ae86894197c61939699 /src
parent17696e133b1db65c662c0be85a4b787964c60de6 (diff)
downloadofono-26804de94b655618b9dd7d70ab5d4c3ea8d36bd0.tar.bz2
Add checking for valid APN format
Diffstat (limited to 'src')
-rw-r--r--src/gprs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gprs.c b/src/gprs.c
index d5f9dc99..506baf1d 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -208,6 +208,9 @@ static DBusMessage *pri_set_apn(struct pri_context *ctx, DBusConnection *conn,
if (g_str_equal(apn, ctx->context.apn))
return dbus_message_new_method_return(msg);
+ if (is_valid_apn(apn) == FALSE)
+ return __ofono_error_invalid_format(msg);
+
strcpy(ctx->context.apn, apn);
g_dbus_send_reply(conn, msg, DBUS_TYPE_INVALID);