From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id ED5C92C2F for ; Wed, 25 Apr 2018 12:15:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2018 03:15:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,325,1520924400"; d="scan'208";a="223196764" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga005.fm.intel.com with ESMTP; 25 Apr 2018 03:15:40 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id w3PAFde5017677; Wed, 25 Apr 2018 11:15:39 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id w3PAFdtY003739; Wed, 25 Apr 2018 11:15:39 +0100 Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id w3PAFd4N003735; Wed, 25 Apr 2018 11:15:39 +0100 From: Anatoly Burakov To: dev@dpdk.org Cc: thomas@monjalon.net Date: Wed, 25 Apr 2018 11:15:36 +0100 Message-Id: X-Mailer: git-send-email 1.7.0.7 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 0/3] Coverity fixes for malloc 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: Wed, 25 Apr 2018 10:15:43 -0000 This patchset fixes a few Coverity issues in malloc introduced by recent DPDK memory hotplug patchset. Coverity issues fixed: - 272566 - possible null dereference - 272574 - use value before verification The following coverity issues were not fixed: - 272573 - calling memset with size 0 - This is intentional, size will not be 0 in malloc debug - 272571 - negative return not handled - False positive, proper API usage ensures no negative returns - 272590 - negative return not handled - Same as above - 272597 - negative return not handled - Same as above Also, replace all instaces of snprintf with strlcpy. v2: - Dropped fixes for 272571, 272590, 272597 as false positives Anatoly Burakov (3): malloc: replace snprintf with strlcpy malloc: fix potential out-of-bounds array access malloc: fix potential dereferencing of NULL pointer lib/librte_eal/common/malloc_elem.c | 6 ++++++ lib/librte_eal/common/malloc_heap.c | 3 ++- lib/librte_eal/common/malloc_mp.c | 23 +++++++++++------------ 3 files changed, 19 insertions(+), 13 deletions(-) -- 2.7.4