[OpenWrt-Devel] [PATCH] netifd: make sure the vlan ifnmae fits into the buffer

Rafał Miłecki zajec5 at gmail.com
Mon Jul 16 05:00:39 EDT 2018


Some nitpicking ;)

s/ifnmae/ifname/

On Mon, 16 Jul 2018 at 10:34, John Crispin <john at phrozen.org> wrote:
> Signed-off-by: John Crispin <john at phrozen.org>
> ---
>  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;

You don't need braces around IFNAMSIZ - 6.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list