From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 84F7FC55C for ; Sat, 25 Jun 2016 00:50:46 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 24 Jun 2016 15:50:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,523,1459839600"; d="scan'208";a="724679702" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by FMSMGA003.fm.intel.com with ESMTP; 24 Jun 2016 15:50:45 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.240]) by IRSMSX108.ger.corp.intel.com ([169.254.11.183]) with mapi id 14.03.0248.002; Fri, 24 Jun 2016 23:50:44 +0100 From: "Mcnamara, John" To: "Pattan, Reshma" , "dev@dpdk.org" CC: "Pattan, Reshma" Thread-Topic: [dpdk-dev] [PATCH v5 2/5] pdump: check getenv return value Thread-Index: AQHRzjauUTyY51SW/UWU3m7dqJ3x7J/5OSow Date: Fri, 24 Jun 2016 22:50:43 +0000 Message-ID: References: <1466776473-30883-1-git-send-email-reshma.pattan@intel.com> <1466786183-3772-1-git-send-email-reshma.pattan@intel.com> <1466786183-3772-3-git-send-email-reshma.pattan@intel.com> In-Reply-To: <1466786183-3772-3-git-send-email-reshma.pattan@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDA5MjFiNjUtNzljZC00NjEwLTk2YmItNzc1OTk0MmE0MmM4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImQ0dnh3QmlTZUViV2hpRHRQdjlmVmZwTFNsdWJteHZ6ZXI0cVlDNkQyZzA9In0= x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v5 2/5] pdump: check getenv return value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2016 22:50:46 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Reshma Pattan > Sent: Friday, June 24, 2016 5:36 PM > To: dev@dpdk.org > Cc: Pattan, Reshma > Subject: [dpdk-dev] [PATCH v5 2/5] pdump: check getenv return value >=20 > inside pdump_get_socket_path(), getenv can return a NULL pointer if the > match for SOCKET_PATH_HOME is not found in the environment. NULL check is > added to return -1 immediately. Since pdump_get_socket_path() returns -1 > now, wherever this function is called there the return value is checked > and error message is logged. >=20 > Coverity issue 127344: return value check Coverity issue 127347: null > pointer dereference >=20 > Fixes: 278f945402c5 ("pdump: add new library for packet capture") >=20 > Signed-off-by: Reshma Pattan Acked-by: John McNamara