From 9269b9c5de53794d3dd862baeb1924d59636f31c Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Fri, 15 Apr 2011 20:17:05 +0200 Subject: [PATCH] ipconfig: Check for NULL pointers before calling inet_pton on them --- src/ipconfig.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ipconfig.c b/src/ipconfig.c index 92ac8f6..616cbcb 100644 --- a/src/ipconfig.c +++ b/src/ipconfig.c @@ -145,6 +145,9 @@ static gboolean check_ipv6_address(const char *address) unsigned char buf[sizeof(struct in6_addr)]; int err; + if (address == NULL) + return FALSE; + err = inet_pton(AF_INET6, address, buf); if (err > 0) return TRUE; -- 2.7.4