DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: "Liu, Changpeng" <changpeng.liu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/2] examples/vhost_scsi: fix potential buffer overrun with safe copy API
Date: Tue, 22 May 2018 20:18:03 +0200	[thread overview]
Message-ID: <9373529.Cr5sn6mvdD@xps> (raw)
In-Reply-To: <FF7FC980937D6342B9D289F5F3C7C2625B65CCE8@SHSMSX103.ccr.corp.intel.com>

22/05/2018 19:58, Liu, Changpeng:
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > 18/05/2018 01:32, Changpeng Liu:
> > > -			strlcpy((char *)vpage->params, bdev->name,
> > > -					sizeof(vpage->params));
> > > +			vhost_strcpy_pad((char *)vpage->params, bdev->name,
> > > +					sizeof(vpage->params), ' ');
> > 
> > Why do you think vhost_strcpy_pad is safer than strlcpy?
> 
> A code Coverity issue 279452 reported for strlcpy, so here replace with internal API can avoid it.

I think it is a false positive.
Remember that Coverity is just a tool.

  reply	other threads:[~2018-05-22 19:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 23:32 [dpdk-dev] [PATCH 1/2] examples/vhost_scsi: add virtio-1.0 feature bit support Changpeng Liu
2018-05-17 23:32 ` [dpdk-dev] [PATCH 2/2] examples/vhost_scsi: fix potential buffer overrun with safe copy API Changpeng Liu
2018-05-22 17:47   ` Thomas Monjalon
2018-05-22 17:58     ` Liu, Changpeng
2018-05-22 18:18       ` Thomas Monjalon [this message]
2018-05-18 12:35 ` [dpdk-dev] [PATCH 1/2] examples/vhost_scsi: add virtio-1.0 feature bit support Maxime Coquelin
2018-05-22 17:51   ` Thomas Monjalon
2018-05-22 20:33     ` Thomas Monjalon
2018-05-22 20:45       ` Liu, Changpeng

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=9373529.Cr5sn6mvdD@xps \
    --to=thomas@monjalon.net \
    --cc=changpeng.liu@intel.com \
    --cc=dev@dpdk.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 NNTP newsgroup(s).