Handle potential NULL pointer with DHCP options
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 11 Sep 2010 10:35:42 +0000 (12:35 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 11 Sep 2010 10:35:42 +0000 (12:35 +0200)
gdhcp/client.c

index 430ecc8..1919af7 100644 (file)
@@ -913,6 +913,9 @@ static GList *get_option_value_list(char *value)
        char *pos = value;
        GList *list = NULL;
 
+       if (pos == NULL)
+               return NULL;
+
        while ((pos = strchr(pos, ' ')) != NULL) {
                *pos = '\0';