patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Michal Jastrzebski <michalx.k.jastrzebski@intel.com>,
	Jacek Piasecki <jacekx.piasecki@intel.com>,
	reshma.pattan@intel.com
Cc: dev@dpdk.org, yliu@fridaylinux.org, maxime.coquelin@redhat.com,
	deepak.k.jain@intel.com, changpeng.liu@intel.com,
	stable@dpdk.org, bruce.richardson@intel.com
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] examples/vhost_scsi: fix buffer not terminated
Date: Mon, 14 May 2018 21:08:08 +0200	[thread overview]
Message-ID: <1932528.5N0iXfLR29@xps> (raw)
In-Reply-To: <20170922130959.13484-1-michalx.k.jastrzebski@intel.com>

22/09/2017 15:09, Michal Jastrzebski:
> From: Jacek Piasecki <jacekx.piasecki@intel.com>
> 
> Fix size of buffer in strcpy. There was possible to get
> not terminated string after copy operation.
> 
> Coverity issue: 158629
> Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
> Cc: changpeng.liu@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
> ---
> -	strncpy(bdev->name, bdev_name, sizeof(bdev->name));
> -	strncpy(bdev->product_name, bdev_serial, sizeof(bdev->product_name));
> +	strncpy(bdev->name, bdev_name, sizeof(bdev->name) - 1);
> +	strncpy(bdev->product_name, bdev_serial,
> +			sizeof(bdev->product_name) - 1);

Can it be fixed with strlcpy?

I wonder why recent patch from Reshma is not touching these lines:
	http://dpdk.org/commit/21ce8e44b8d

  parent reply	other threads:[~2018-05-14 19:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22 13:09 [dpdk-stable] " Michal Jastrzebski
2017-10-02 13:53 ` [dpdk-stable] [dpdk-dev] " Jastrzebski, MichalX K
2017-10-11 13:45   ` Jastrzebski, MichalX K
2018-05-14 19:08 ` Thomas Monjalon [this message]
2018-05-15  5:59   ` Pattan, Reshma
  -- strict thread matches above, loose matches on Subject: below --
2017-09-22 13:08 [dpdk-stable] " Michal Jastrzebski
2017-09-22 13:23 ` [dpdk-stable] [dpdk-dev] " Jastrzebski, MichalX K
2017-09-22 13:07 [dpdk-stable] " Michal Jastrzebski
2017-10-02 13:50 ` [dpdk-stable] [dpdk-dev] " Jastrzebski, MichalX K
2017-10-02 15:07   ` Maxime Coquelin

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=1932528.5N0iXfLR29@xps \
    --to=thomas@monjalon.net \
    --cc=bruce.richardson@intel.com \
    --cc=changpeng.liu@intel.com \
    --cc=deepak.k.jain@intel.com \
    --cc=dev@dpdk.org \
    --cc=jacekx.piasecki@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=michalx.k.jastrzebski@intel.com \
    --cc=reshma.pattan@intel.com \
    --cc=stable@dpdk.org \
    --cc=yliu@fridaylinux.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).