Re: [v4l-utils PATCH 1/2] libmediactl: Drop length argument from media_get_entity_by_name()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 26, 2016 at 03:07:41PM +0300, Laurent Pinchart wrote:
> Hi Sakari,
> 
> On Tuesday 24 May 2016 23:50:44 Sakari Ailus wrote:
> > On Tue, May 24, 2016 at 08:09:37PM +0300, Laurent Pinchart wrote:
> > ...
> > 
> > > > +		if (strcmp(entity->info.name, name) == 0)
> > > 
> > > While the kernel API guarantees that entity->info.name will be NULL-
> > > terminated, wouldn't it be safer to add a safety check here ?
> > 
> > The kernel implementation in media-device.c does use strlcpy() so this is
> > even not about drivers doing this right. If you insist, I'll change it. :-)
> 
> I suppose we'll have other problems if the kernel doesn't behave.
> 
> Acked-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

Thanks!

I'll then proceed to push the two patches to v4l-utils.

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ailus@xxxxxx	XMPP: sailus@xxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux