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

Thanks for the review!

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. :-)

-- 
Cheers,

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