From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Karl Nasrallah <knnspeed@aol.com>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
Linux-SH <linux-sh@vger.kernel.org>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH] sh: use generic strncpy()
Date: 19 Dec 2019 09:45:58 +0900 [thread overview]
Message-ID: <87zhfpywft.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <CAMuHMdUq6U0i_+Dg57jVNYM4iephuZ8k3QC6AyQ--W_qY5=q9w@mail.gmail.com>
Hi Geert
Thank you for your review
> > But, current SH strnpy() has 2 issues.
> > 1st is it will access to out-of-memory (= src + 10).
>
> I believe this is not correct: the code does not really access memory
> beyond the end of the source string. (Recent) gcc just thinks so,
> because "__src+__n" is used as a parameter to the routine.
I see.
Will fix in v2
Thank you for your help !!
Best regards
---
Kuninori Morimoto
next prev parent reply other threads:[~2019-12-19 0:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 5:22 [PATCH] sh: use generic strncpy() Kuninori Morimoto
2019-12-18 8:02 ` Geert Uytterhoeven
2019-12-19 0:45 ` Kuninori Morimoto [this message]
2019-12-18 7:31 [PATCH 0/2] " Kuninori Morimoto
2019-12-18 7:32 ` [PATCH] " Kuninori Morimoto
2019-12-18 7:35 ` Kuninori Morimoto
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=87zhfpywft.wl-kuninori.morimoto.gx@renesas.com \
--to=kuninori.morimoto.gx@renesas.com \
--cc=dalias@libc.org \
--cc=geert@linux-m68k.org \
--cc=knnspeed@aol.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=ysato@users.sourceforge.jp \
/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 NNTP newsgroup(s).