linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Cc: suganath-prabu.subramani@broadcom.com,
	MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, arnd@arndb.de
Subject: Re: [PATCH] scsi: mptfusion: use strlcpy() instead of strncpy()
Date: Mon, 08 Jan 2018 21:54:43 -0500	[thread overview]
Message-ID: <yq1shbfoi6k.fsf@oracle.com> (raw)
In-Reply-To: <1515415753-10534-1-git-send-email-wangxiongfeng2@huawei.com> (Xiongfeng Wang's message of "Mon, 8 Jan 2018 20:49:13 +0800")


Xiongfeng,

> gcc-8 reports
>
> drivers/message/fusion/mptbase.c: In function 'mpt_display_event_info':
> ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified
> bound 100 equals destination size [-Wstringop-truncation]
>
> We need to use strlcpy() to make sure the dest string is
> nul-terminated.

Applied to 4.16/scsi-queue. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

      parent reply	other threads:[~2018-01-09  2:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-08 12:49 [PATCH] scsi: mptfusion: use strlcpy() instead of strncpy() Xiongfeng Wang
2018-01-08 16:43 ` Arnd Bergmann
2018-01-09  2:54 ` Martin K. Petersen [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=yq1shbfoi6k.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=MPT-FusionLinux.pdl@broadcom.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=suganath-prabu.subramani@broadcom.com \
    --cc=wangxiongfeng2@huawei.com \
    /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).