Signed-off-by: John Crispin <[email protected]>
---
 vlan.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/vlan.c b/vlan.c
index 067f624..43526d8 100644
--- a/vlan.c
+++ b/vlan.c
@@ -104,6 +104,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 -ENAMETOOLONG;
+
        /* 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)
-- 
2.11.0


_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to