diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-09-11 12:35:42 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-09-11 12:35:42 +0200 |
commit | bae6cdc4e55f1523b1602159331b73a3deb86984 (patch) | |
tree | 0f9b65b4097d8c53cec23339ed42bf0e73ee7db8 | |
parent | d7cfdc4c15465b8581329f57da9ec6b47208ea03 (diff) | |
download | connman-bae6cdc4e55f1523b1602159331b73a3deb86984.tar.gz connman-bae6cdc4e55f1523b1602159331b73a3deb86984.tar.bz2 connman-bae6cdc4e55f1523b1602159331b73a3deb86984.zip |
Handle potential NULL pointer with DHCP options
-rw-r--r-- | gdhcp/client.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdhcp/client.c b/gdhcp/client.c index 430ecc86..1919af79 100644 --- a/gdhcp/client.c +++ b/gdhcp/client.c @@ -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'; |