projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bd503c
)
ofono: Check for mcc before using it as an index
author
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 10 Feb 2012 14:53:29 +0000
(15:53 +0100)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 10 Feb 2012 14:54:14 +0000
(15:54 +0100)
Also avoid calling set_regdom is the alpha2 is NULL.
plugins/ofono.c
patch
|
blob
|
history
diff --git
a/plugins/ofono.c
b/plugins/ofono.c
index 0a77a6f185102a7e9eedb45f43f0d522d089d64a..df2b580772ddb49c5e13e40005f94feccf7b79f1 100644
(file)
--- a/
plugins/ofono.c
+++ b/
plugins/ofono.c
@@
-1415,11
+1415,12
@@
static void netreg_update_regdom(struct modem_data *modem,
mcc = atoi(mobile_country_code);
- if (mcc > 799)
+ if (mcc > 799
|| mcc < 200
)
return;
alpha2 = mcc_country_codes[mcc - 200];
- connman_technology_set_regdom(alpha2);
+ if (alpha2 != NULL)
+ connman_technology_set_regdom(alpha2);
}
static gboolean netreg_changed(DBusConnection *connection, DBusMessage *message,