From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 002C38E71 for ; Tue, 17 Apr 2018 12:24:44 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 682D12147B; Tue, 17 Apr 2018 06:24:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 17 Apr 2018 06:24:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=FdDpSRufQ/LtUXMHMnBYQuN1Hu iszq9onAvYdu8Yr48=; b=np95YcshZa/2AfnexyxTx52yVsNYViFesJZJKIkti4 DHhYSPoJ0+ZB6nHhC2z0Udk7kYoWjZvs+yVHvI2KMHbTqtg4IX6Of5WA1TIsQUOa LUb7W/Wme/mqG56aJsvM1RyKhNQ3LjbyzGwWcJ3Om5Bwe7QeAm8PGz4cKSk4JQKV g= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=FdDpSR ufQ/LtUXMHMnBYQuN1Huiszq9onAvYdu8Yr48=; b=YyECxXPw7P0QpDCn7MzN8+ WUzaTbArvfJtO3lvnh05Gh9caZPpLgA0aebkgtuH9skzVcu8lT3Z0dZ9zyORmqlm euIs7ozEpd7rjSinLKBEGSUIiySfSsMUTLarUUkH8Od+IkGILVqtUElMs+TLKN0S 0VtKan5+3VNjtQ1rTQzm10nHNB+e7ECv32CNHauleEmPvG9/orHGDR0P+Syyvn4B pNFE25PsoluirG/FDqoBJOep61e18mofBppRl471ZUP4k1X9W4a4/2EgDQl6A4Qn JzEnT8kJu9w8r3U57m3TaxyHDdqwEAo0ZmoKeEGPYe10SWsJXzuA3jXhPcThVdmg == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 9D85BE43A6; Tue, 17 Apr 2018 06:24:43 -0400 (EDT) From: Thomas Monjalon To: Yangchao Zhou Cc: dev@dpdk.org, anatoly.burakov@intel.com, bruce.richardson@intel.com Date: Tue, 17 Apr 2018 12:24:42 +0200 Message-ID: <1581620.t7eghVUmVK@xps> In-Reply-To: <1523959561-17400-1-git-send-email-zhouyates@gmail.com> References: <6821483b-30f3-ac79-208c-406fb46685af@intel.com> <1523959561-17400-1-git-send-email-zhouyates@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] mem: memory leaks of hubedir caused by strdup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Apr 2018 10:24:45 -0000 17/04/2018 12:06, Yangchao Zhou: > Coverity issue: 272585 > Fixes: cb97d93e9d3b ("mem: share hugepage info primary and secondary") > > Signed-off-by: Yangchao Zhou > Acked-by: Anatoly Burakov 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