From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>, linux-media@vger.kernel.org
Subject: Re: [v4l-utils PATCH 1/2] libmediactl: Drop length argument from media_get_entity_by_name()
Date: Thu, 26 May 2016 15:07:41 +0300 [thread overview]
Message-ID: <6424543.oB6h8DCtnj@avalon> (raw)
In-Reply-To: <20160524205044.GH26360@valkosipuli.retiisi.org.uk>
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@ideasonboard.com>
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2016-05-26 12:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 12:48 [v4l-utils PATCH 0/2] Prepare for mediatext library, cleanups Sakari Ailus
2016-05-24 12:48 ` [v4l-utils PATCH 1/2] libmediactl: Drop length argument from media_get_entity_by_name() Sakari Ailus
2016-05-24 17:09 ` Laurent Pinchart
2016-05-24 20:50 ` Sakari Ailus
2016-05-26 12:07 ` Laurent Pinchart [this message]
2016-05-26 12:28 ` Sakari Ailus
2016-05-24 12:48 ` [v4l-utils PATCH 2/2] mediactl: Separate entity and pad parsing Sakari Ailus
2016-05-24 17:14 ` Laurent Pinchart
2016-05-24 20:54 ` Sakari Ailus
2016-05-24 20:56 ` [v4l-utils PATCH v1.1 " Sakari Ailus
2016-05-24 22:38 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6424543.oB6h8DCtnj@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.