On Thu, 2012-04-05 at 14:23 -0400, Jakub Hrozek wrote:
> On Thu, Apr 05, 2012 at 11:15:18AM -0700, Stephen Gallagher wrote:
> > On Thu, 2012-04-05 at 14:07 -0400, Jakub Hrozek wrote:
> > > Reported in
https://bugzilla.redhat.com/show_bug.cgi?id=808107
> > >
> > > In the unlikely case that the interface name was IFNAMSIZ bytes long or
> > > longer, strncpy wouldn't NULL-terminate the buffer. Copy one byte
less
> > > to ensure the buffer is NULL-terminated.
> >
> > Nack, this is incomplete. You need to do:
> >
> > strncpy(iwr.ifr_ifrn.ifrn_name, ifname, IFNAMSIZ-1);
> > iwr.ifr_ifrn.ifrn_name[IFNAMSIZ-1] = '\0';
>
> Thank you, a new patch is attached.
Ack