From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Németh Márton" <nm127@freemail.hu>
Cc: V4L Mailing List <linux-media@vger.kernel.org>,
cocci@diku.dk, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usbvideo: limit the length of string creation
Date: Tue, 1 Dec 2009 12:33:12 +0100 [thread overview]
Message-ID: <200912011233.12290.laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <4B081D40.9030607@freemail.hu>
On Saturday 21 November 2009 18:02:56 Németh Márton wrote:
> From: Márton Németh <nm127@freemail.hu>
>
> Use strlcat() to append a string to the previously created first part.
> The strlcat() function limits the size of the string to the whole
> destination buffer.
>
> The semantic match that finds this kind of problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression dev;
> expression phys;
> expression str;
> expression size;
> @@
> usb_make_path(dev, phys, size);
> - strncat(phys, str, size);
> + strlcat(phys, str, size);
> // </smpl>
>
> Signed-off-by: Márton Németh <nm127@freemail.hu>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2009-12-01 11:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-21 17:02 Németh Márton
2009-12-01 11:33 ` Laurent Pinchart [this message]
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=200912011233.12290.laurent.pinchart@ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=cocci@diku.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=nm127@freemail.hu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®