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 430ecc863878b3a56b04ad53438a089c89777902..1919af79355188c547ef8e28996a71cf70e64223 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';