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:
17696e1
)
Add checking for valid APN format
author
Denis Kenzior
<denkenz@gmail.com>
Fri, 30 Oct 2009 20:54:32 +0000
(15:54 -0500)
committer
Denis Kenzior
<denkenz@gmail.com>
Fri, 30 Oct 2009 20:54:32 +0000
(15:54 -0500)
src/gprs.c
patch
|
blob
|
history
diff --git
a/src/gprs.c
b/src/gprs.c
index
d5f9dc9
..
506baf1
100644
(file)
--- 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);