diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2015-01-29 21:28:52 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2015-01-29 21:28:52 +0100 |
commit | 60cd66b4fa77fe470772aa4957b43ce060555c2c (patch) | |
tree | 05947bc2b33c91df63c743cb3e5e317b69fe6311 | |
parent | dc38332224f804be1f0557789c95442898827d72 (diff) |
helpers: avoid segfault when empty pdp type string is given
https://bugzilla.redhat.com/show_bug.cgi?id=1183250
-rw-r--r-- | src/mm-modem-helpers.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c index 64b4928c..d40082dd 100644 --- a/src/mm-modem-helpers.c +++ b/src/mm-modem-helpers.c @@ -1897,6 +1897,8 @@ mm_3gpp_get_pdp_type_from_ip_family (MMBearerIpFamily family) MMBearerIpFamily mm_3gpp_get_ip_family_from_pdp_type (const gchar *pdp_type) { + if (!pdp_type) + return MM_BEARER_IP_FAMILY_NONE; if (g_str_equal (pdp_type, "IP")) return MM_BEARER_IP_FAMILY_IPV4; if (g_str_equal (pdp_type, "IPV4")) |