On 02/20/15 at 11:16am, Ben Pfaff wrote:
> diff --git a/lib/ovs-router.c b/lib/ovs-router.c
> index 8de2e2d..bf205d6 100644
> --- a/lib/ovs-router.c
> +++ b/lib/ovs-router.c
> @@ -72,7 +72,7 @@ ovs_router_lookup(ovs_be32 ip_dst, char output_bridge[], 
> ovs_be32 *gw)
>      if (cr) {
>          struct ovs_router_entry *p = ovs_router_entry_cast(cr);
>  
> -        strncpy(output_bridge, p->output_bridge, IFNAMSIZ);
> +        ovs_strlcpy(output_bridge, p->output_bridge, IFNAMSIZ);
>          *gw = p->gw;
>          return true;
>      }
> diff --git a/lib/tnl-ports.c b/lib/tnl-ports.c
> index e6739b9..c8b2615 100644
> --- a/lib/tnl-ports.c
> +++ b/lib/tnl-ports.c
> @@ -101,7 +101,7 @@ tnl_port_map_insert(odp_port_t port, ovs_be32 ip_dst, 
> ovs_be16 udp_port,
>  
>          cls_rule_init(&p->cr, &match, 0);   /* Priority == 0. */
>          ovs_refcount_init(&p->ref_cnt);
> -        strncpy(p->dev_name, dev_name, IFNAMSIZ);
> +        ovs_strlcpy(p->dev_name, dev_name, IFNAMSIZ);
>  
>          classifier_insert(&cls, &p->cr, NULL, 0);
>      }

Nit: The above 2 still use IFNAMSIZ as dst.

Otherwise:
Acked-by: Thomas Graf <tg...@noironetworks.com>

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to