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]

 



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>

-- 
Regards,

Laurent Pinchart

--
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