DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>,
	Yangchao Zhou <zhouyates@gmail.com>
Cc: dev@dpdk.org, bruce.richardson@intel.com
Subject: Re: [dpdk-dev] [PATCH v2] mem: memory leaks of hubedir caused by strdup
Date: Tue, 17 Apr 2018 11:31:09 +0100	[thread overview]
Message-ID: <dfa84a58-2395-1be9-f314-ef20dfac35c2@intel.com> (raw)
In-Reply-To: <1581620.t7eghVUmVK@xps>

On 17-Apr-18 11:24 AM, Thomas Monjalon wrote:
> 17/04/2018 12:06, Yangchao Zhou:
>> Coverity issue: 272585
>> Fixes: cb97d93e9d3b ("mem: share hugepage info primary and secondary")
>>
>> Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
>> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> 
> Better to provide a small explanation.
> 
>> -					retval = strdup(splitstr[MOUNTPT]);
>> +					snprintf(hugedir, len, "%s", splitstr[MOUNTPT]);
> 
> I think it is candidate to be replaced by strlcpy.
> Please check
> 

Yes, it seems that strlcpy thingie was merged without much fanfare. I'll 
be submitting a patch fixing various usages of snprintf in my recent 
commits. I'm inclined to leave this as is for this commit, as it's not 
the purpose of this fix.

-- 
Thanks,
Anatoly

  reply	other threads:[~2018-04-17 10:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17  9:43 [dpdk-dev] [PATCH] " Yangchao Zhou
2018-04-17  9:57 ` Burakov, Anatoly
2018-04-17 10:06   ` [dpdk-dev] [PATCH v2] " Yangchao Zhou
2018-04-17 10:24     ` Thomas Monjalon
2018-04-17 10:31       ` Burakov, Anatoly [this message]
2018-04-17 11:16         ` zhouyangchao
2018-04-17 11:47           ` Thomas Monjalon
2018-04-17 14:02             ` Burakov, Anatoly
2018-04-18  3:09               ` [dpdk-dev] [PATCH v3] mem: fix memory leaks of hugedir and replace snprintf Yangchao Zhou
2018-04-18  9:00                 ` Thomas Monjalon
2018-04-18  9:25                   ` Burakov, Anatoly

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=dfa84a58-2395-1be9-f314-ef20dfac35c2@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=zhouyates@gmail.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).