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 6F093A054F; Tue, 18 Feb 2020 22:52:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B1EA91C025; Tue, 18 Feb 2020 22:52:33 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id BCDB91BFFF for ; Tue, 18 Feb 2020 22:52:32 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Feb 2020 13:52:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,458,1574150400"; d="scan'208";a="436003634" Received: from rmenon-mobl.amr.corp.intel.com (HELO [134.134.172.78]) ([134.134.172.78]) by fmsmga006.fm.intel.com with ESMTP; 18 Feb 2020 13:52:31 -0800 From: Ranjit Menon To: Dmitry Kozlyuk Cc: Harini Ramakrishnan , Omar Cardona , Pallavi Kadam , dev@dpdk.org References: <20200217022351.59429-1-dmitry.kozliuk@gmail.com> <20200217235616.85746-1-dmitry.kozliuk@gmail.com> Message-ID: <74717379-19b6-f37a-5542-8520538de003@intel.com> Date: Tue, 18 Feb 2020 13:52:31 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <20200217235616.85746-1-dmitry.kozliuk@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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" 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