chiark / gitweb /
netowrkd:deserialize_dhcp_routes verify strndup ret
authorSusant Sahani <susant@redhat.com>
Sun, 29 Jun 2014 19:39:08 +0000 (01:09 +0530)
committerTom Gundersen <teg@jklm.no>
Sun, 29 Jun 2014 20:22:35 +0000 (22:22 +0200)
strndup need to be chcked

src/libsystemd-network/network-internal.c

index a5db0c5..317d5de 100644 (file)
@@ -474,6 +474,8 @@ int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, size_t
                         return -ENOMEM;
 
                 entry = strndup(word, len);
+                if(!entry)
+                        return -ENOMEM;
 
                 tok = entry;