From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: tomasz.unger@yahoo.pl
Cc: Hans de Goede <hansg@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, Andy Shevchenko <andy@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v2] staging: media: atomisp: replace sprintf() with strscpy()
Date: Thu, 26 Feb 2026 11:49:15 +0200 [thread overview]
Message-ID: <aaAXG3KCmKufRgBB@smile.fi.intel.com> (raw)
In-Reply-To: <20260226085510.65038-1-tomasz.unger@yahoo.pl>
On Thu, Feb 26, 2026 at 09:55:10AM +0100, tomasz.unger@yahoo.pl wrote:
> Auditing calls to sprintf(). This code is fine because we are
> copying 9 characters into a 52 character buffer. But it would
> be cleaner to use strscpy() instead.
Not only cleaner, the strscpy() 2-argument version has an additional check for
dst to be an array.
Is it the only place in the whole driver like this?
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-02-26 9:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260226085510.65038-1-tomasz.unger.ref@yahoo.pl>
2026-02-26 8:55 ` [PATCH v2] staging: media: atomisp: replace sprintf() with strscpy() tomasz.unger
2026-02-26 9:49 ` Andy Shevchenko [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=aaAXG3KCmKufRgBB@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=tomasz.unger@yahoo.pl \
/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