diff options
author | John Crispin <john@phrozen.org> | 2018-07-16 10:32:08 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-07-27 09:22:32 +0200 |
commit | ca970979e9a2b62646b610bfc32f655993527d03 (patch) | |
tree | 321c0ae7f7790deaaad7fd4ad9ce8e11fd61032b | |
parent | b8c1bca9c506f8ab917bbed3de5ad433990ca618 (diff) |
netifd: make sure the vlan ifname fits into the buffer
Signed-off-by: John Crispin <john@phrozen.org>
-rw-r--r-- | vlan.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -106,6 +106,9 @@ static struct device *get_vlan_device(struct device *dev, int id, bool create) struct vlan_device *vldev; struct device_user *dep; + if (strlen(dev->ifname) > (IFNAMSIZ - 6)) + return NULL; + /* look for an existing interface before creating a new one */ list_for_each_entry(dep, &dev->users.list, list.list) { if (dep->cb != vlan_dev_cb) |