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().
This commit is contained in:
Dan Williams
2010-01-19 12:27:54 -08:00
parent 82eecfca92
commit f4d2e30525
+2
View File
@@ -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) {