core: use ASSERT_VALID_PATH_COMPONENT
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
@@ -1046,6 +1046,9 @@ nm_utils_ip6_property_path (const char *ifname, const char *property)
|
||||
static char path[sizeof (IPV6_PROPERTY_DIR) + IFNAMSIZ + 32];
|
||||
int len;
|
||||
|
||||
ifname = ASSERT_VALID_PATH_COMPONENT (ifname);
|
||||
property = ASSERT_VALID_PATH_COMPONENT (property);
|
||||
|
||||
len = g_snprintf (path, sizeof (path), IPV6_PROPERTY_DIR "%s/%s",
|
||||
ifname, property);
|
||||
g_assert (len < sizeof (path) - 1);
|
||||
|
Reference in New Issue
Block a user