From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4721DA0525; Fri, 21 Feb 2020 17:37:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 21C341BFAC; Fri, 21 Feb 2020 17:37:49 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 47AF534F3 for ; Fri, 21 Feb 2020 17:37:47 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 79B6421C28; Fri, 21 Feb 2020 11:37:46 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 21 Feb 2020 11:37:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=yFAwwMztzI6U4Cd6bnr8a5TN5pKgcMgqeaLQKquNmgE=; b=gG7xNlKKq3fP zrJIMLh1+Aj4hlZYvWiZDCIkiLZ3tpL1CS5lmguJfOfLC9ydrYV6r6XmAvXiwfns P5+qnivX/+USi9GKYu1hPZVQ8DLxc7lBkGa9cqfc3z4LRwwxdjjNYNthTAAHl1Cs jXWz6cCPMYd5ClHE8bo21XH0b4jAnMk= 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=yFAwwMztzI6U4Cd6bnr8a5TN5pKgcMgqeaLQKquNm gE=; b=q+pD3M93qDTu6IjHUSccsr8yiWC+0GTbzdXoEwQHi0Xvl0q/Agyu8+mVk ABjy5p7bQG6E/tmC9d1hrRAnlbfYbU9tEZeds2kRZVqaps+Ylr/tDx0i41vSHk0U koPewnuV3XFshCBcIojjF2J1hjyBlNXCHXn2i4+cSkLrPjaJD6XWlGiI/zGGbFK3 DsvXOEzQ8PSXa6xW7bAnAOf134pIzmtBqWe8LfsdfWSFlKkVwiqgxMfNIMhOgAHh erF1+xbqKDaGFHOunCpkVrrJ8uO5amieLYXqJsjk6EGNA/UK/Dkm0u9E8o64O5W0 74ZhE/hCeUiQf31ssbgEoLzDMUUAw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrkeeggdeltdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id F40573060C21; Fri, 21 Feb 2020 11:37:44 -0500 (EST) From: Thomas Monjalon To: Dmitry Kozlyuk Cc: dev@dpdk.org, Harini Ramakrishnan , Omar Cardona , Pallavi Kadam , dev@dpdk.org, Ranjit Menon Date: Fri, 21 Feb 2020 17:37:43 +0100 Message-ID: <1821908.yKVeVyVuyW@xps> In-Reply-To: <74717379-19b6-f37a-5542-8520538de003@intel.com> References: <20200217022351.59429-1-dmitry.kozliuk@gmail.com> <20200217235616.85746-1-dmitry.kozliuk@gmail.com> <74717379-19b6-f37a-5542-8520538de003@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] eal/windows: fix out-of-memory check 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 18/02/2020 22:52, Ranjit Menon: > On 2/17/2020 3:56 PM, Dmitry Kozlyuk wrote: > > Check vsnprintf() result to prevent calling malloc() with negative size. > > Check actual malloc() result and terminate asprintf() with documented > > error code to prevent the use of NULL pointer. > > > > Fixes: e8428a9d8 ("eal/windows: add some basic functions and macros") > > > > Signed-off-by: Dmitry Kozlyuk > > --- > > lib/librte_eal/windows/eal/include/rte_os.h | 9 ++++++--- > > 1 file changed, 6 insertions(+), 3 deletions(-) > > > > v2 Changes: > > Check vsnprintf() value before appending place for '\0'. > > > Acked-by: Ranjit Menon Applied, thanks. Note: adding "in asprintf" to the title in order to give context.