oFono: Initialize prefix_length
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 8 May 2012 15:08:23 +0000 (17:08 +0200)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Wed, 9 May 2012 14:13:57 +0000 (17:13 +0300)
We could end up calling connman_ipaddress_set_ipv6() withouth
prefix_lenght initialized.

Reported by hdante.

plugins/ofono.c

index 0dfadb8..f65d78a 100644 (file)
@@ -834,7 +834,7 @@ static void extract_ipv6_settings(DBusMessageIter *array,
 {
        DBusMessageIter dict;
        char *address = NULL, *gateway = NULL;
-       unsigned char prefix_length;
+       unsigned char prefix_length = 0;
        char *nameservers = NULL;
        const char *interface = NULL;
        int index = -1;