From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatoly Burakov Subject: [PATCH v2 0/3] Coverity fixes for malloc Date: Wed, 25 Apr 2018 11:15:36 +0100 Message-ID: References: Cc: thomas@monjalon.net To: dev@dpdk.org 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) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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