On ti, 2013-11-12 at 14:15 +0100, Daniel Wagner wrote:
> Hi Tomasz,
> 
> On 11/12/2013 02:12 PM, Tomasz Bursztyka wrote:
> > Hi Daniel,
> >
> >> -    strncpy(ifr.ifr_name, tunnel, IFNAMSIZ);
> >> +    strncpy(ifr.ifr_name, tunnel, IFNAMSIZ - 1);
> >
> > Either use IFNAMSIZ or sizeof(ifr.ifr_name) but let's not mix both.

I would prefer sizeof(), that way you do not need to know how long the
buffer is suppose to be.


Cheers,
Jukka


_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to