Handle reading failure replies correctly everywhere.

This commit is contained in:
Tambet Ingo
2008-09-01 16:01:55 +03:00
parent 1bb60347b5
commit c56d5a257b
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ enable (MMModem *modem,
static gboolean
parse_syscfg (const char *reply, int *mode_a, int *mode_b, guint32 *band, int *unknown1, int *unknown2)
{
if (strncmp (reply, "^SYSCFG:", 8))
if (reply == NULL || strncmp (reply, "^SYSCFG:", 8))
return FALSE;
if (sscanf (reply + 8, "%d,%d,%x,%d,%d", mode_a, mode_b, band, unknown1, unknown2))