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:39:23 +0100 |
commit | 8040d20aef915920074da8ffb4dd6ac54588c3f5 (patch) | |
tree | e54ae0101cf7464944ef713bcef302a16889e553 | |
parent | 50aa4bd5dcf207b733599a14384258d6f6888a06 (diff) | |
download | ModemManager-8040d20aef915920074da8ffb4dd6ac54588c3f5.tar.gz |
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 64b4928c5..d40082dd5 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")) |