diff options
author | Dan Williams <dcbw@redhat.com> | 2010-01-19 12:27:54 -0800 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-01-19 12:27:54 -0800 |
commit | f4d2e30525055591d0f3bddd99936be4a5e3d444 (patch) | |
tree | 680125a7a8624e95418cff5bcfb3305e85442d43 | |
parent | 82eecfca923a3b4dec6c363e756516f6aaa47486 (diff) |
huawei-cdma: robustify SYSINFO parsing
Shouldn't happen since the number of matches was already
verified, but doesn't hurt to make sure we don't pass NULL
to strtol().
-rw-r--r-- | plugins/mm-modem-huawei-cdma.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mm-modem-huawei-cdma.c b/plugins/mm-modem-huawei-cdma.c index 72447719..3b63a486 100644 --- a/plugins/mm-modem-huawei-cdma.c +++ b/plugins/mm-modem-huawei-cdma.c @@ -129,6 +129,8 @@ uint_from_match_item (GMatchInfo *match_info, guint32 num, guint32 *val) gboolean success = FALSE; str = g_match_info_fetch (match_info, num); + g_return_val_if_fail (str != NULL, FALSE); + errno = 0; tmp = strtol (str, NULL, 10); if (errno == 0 && tmp >= 0 && tmp <= G_MAXUINT) { |