[PATCH] Fix some warnings from Coverity
Volker Lendecke
vl at samba.org
Thu Dec 1 19:54:56 UTC 2016
On Thu, Dec 01, 2016 at 08:50:46PM +0100, Volker Lendecke wrote:
> On Thu, Dec 01, 2016 at 11:44:11AM -0800, Jeremy Allison wrote:
> > On Thu, Dec 01, 2016 at 08:34:37PM +0100, Andreas Schneider wrote:
> > > Hi,
> > >
> > > some minor things, they will make Coverity happy.
> > >
> > >
> > > Review and push appreciated.
> >
> > In:
> >
> > [PATCH 2/2] libsocket: Make sure ifr.ifr_name is null-terminated
>
> Does that have to be null-terminated for the ioctl at all?
Some cross-ref suggests not:
http://lxr.free-electrons.com/source/net/core/dev.c#L758
has a call to
if (!strncmp(dev->name, name, IFNAMSIZ))
which says it doesn't have to be null-terminated. No clue if that is
the right reference though.
If we null-terminate, we might miss weird long interface names.
Any insights someone?
Volker
More information about the samba-technical
mailing list