[libfko] added defensive NULL check for is_valid_ipv4_addr()
authorMichael Rash <mbr@cipherdyne.org>
Thu, 5 Dec 2013 04:11:11 +0000 (23:11 -0500)
committerMichael Rash <mbr@cipherdyne.org>
Thu, 5 Dec 2013 04:11:11 +0000 (23:11 -0500)
lib/fko_util.c

index e098464..83997df 100644 (file)
@@ -124,6 +124,9 @@ is_valid_ipv4_addr(const char * const ip_str)
     struct in_addr      in;
 #endif
 
+    if(ip_str == NULL)
+        return 0;
+
     while(*ndx != '\0')
     {
         char_ctr++;