Linux-Hardening mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>,
	Justin Stitt <justinstitt@google.com>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org,
	Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH v3] soc: qcom: cmd-db: replace deprecated strncpy with strtomem
Date: Sun, 21 Apr 2024 17:29:13 -0500	[thread overview]
Message-ID: <171373856769.1196479.1804405630456306049.b4-ty@kernel.org> (raw)
In-Reply-To: <20240319-strncpy-drivers-soc-qcom-cmd-db-c-v3-1-aeb5c5180c32@google.com>


On Tue, 19 Mar 2024 21:19:59 +0000, Justin Stitt wrote:
> strncpy() is an ambiguous and potentially dangerous interface [1]. We
> should prefer more robust and less ambiguous alternatives.
> 
> @query is marked as __nonstring and doesn't need to be NUL-terminated.
> 
> Since we are doing a string to memory copy, we can use the aptly named
> "strtomem" -- specifically, the "pad" variant to also ensure NUL-padding
> throughout the destination buffer.
> 
> [...]

Applied, thanks!

[1/1] soc: qcom: cmd-db: replace deprecated strncpy with strtomem
      commit: 166db01007ea802ff9933ac73ec8f140ca0cf5d5

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

      reply	other threads:[~2024-04-21 22:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 21:19 [PATCH v3] soc: qcom: cmd-db: replace deprecated strncpy with strtomem Justin Stitt
2024-04-21 22:29 ` Bjorn Andersson [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=171373856769.1196479.1804405630456306049.b4-ty@kernel.org \
    --to=andersson@kernel.org \
    --cc=justinstitt@google.com \
    --cc=keescook@chromium.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).