fixed SVACE issues of self-test 88/79788/1
authorchanywa <cbible.kim@samsung.com>
Wed, 13 Jul 2016 03:37:09 +0000 (12:37 +0900)
committerchanywa <cbible.kim@samsung.com>
Wed, 13 Jul 2016 03:37:09 +0000 (12:37 +0900)
Change-Id: Ief2feb0773ea60c7577866c4cc8639df91f829b7

lbs-server/src/data_connection.c

index 6e7522ca084ab1a614841f63361a09da078ed269..7daf204fddb40d92195c47d80555e119d60bbbd6 100644 (file)
@@ -292,7 +292,8 @@ unsigned int query_dns(char *pdns_lookup_addr, unsigned int *ipaddr, int *port)
                pdns_lookup_addr = ptr;
 
                ptr = (char *)strtok_r(NULL, ":", &last);
-               *port = atoi(ptr);
+               if (ptr)
+                       *port = atoi(ptr);
        }
 
        tmpbuf = malloc(tmplen);