From: Dan Carpenter <dan.carpenter@linaro.org>
To: tomasz.unger@yahoo.pl
Cc: hansg@kernel.org, mchehab@kernel.org,
andriy.shevchenko@intel.com, gregkh@linuxfoundation.org,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] staging: media: atomisp: replace sprintf() with strscpy()
Date: Thu, 26 Feb 2026 15:01:15 +0300 [thread overview]
Message-ID: <aaA2C0j97GwbUwmZ@stanley.mountain> (raw)
In-Reply-To: <20260226111653.74371-1-tomasz.unger@yahoo.pl>
On Thu, Feb 26, 2026 at 12:16:53PM +0100, tomasz.unger@yahoo.pl wrote:
> From: Tomasz Unger <tomasz.unger@yahoo.pl>
>
> 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. Additionally, the 2-argument
> version of strscpy() checks at compile time that dst is an array,
> not just a pointer.
>
> This is the only sprintf() call in the whole driver.
>
> Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl>
> ---
Thanks!
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
regards,
dan carpenter
prev parent reply other threads:[~2026-02-26 12:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260226111653.74371-1-tomasz.unger.ref@yahoo.pl>
2026-02-26 11:16 ` [PATCH v3] staging: media: atomisp: replace sprintf() with strscpy() tomasz.unger
2026-02-26 12:01 ` Dan Carpenter [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=aaA2C0j97GwbUwmZ@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=andriy.shevchenko@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--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