From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatoly Burakov Subject: [PATCH 0/5] Coverity fixes for malloc Date: Tue, 17 Apr 2018 16:48:12 +0100 Message-ID: Cc: thomas@monjalon.net To: dev@dpdk.org Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 603FBD59A for ; Tue, 17 Apr 2018 17:48:22 +0200 (CEST) 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: - 272571 - negative return not handled - 272597 - negative return not handled - 272574 - use value before verification - 272590 - negative return not handled - 272566 - possible null dereference The following coverity issues were not fixed: - 272573 - calling memset with size 0 - This is intentional, size will not be 0 in malloc debug Also, replace all instaces of snprintf with strlcpy. Anatoly Burakov (5): malloc: replace snprintf with strlcpy malloc: fix potential out-of-bounds array access malloc: fix potential negative return malloc: fix potential dereferencing of NULL pointer malloc: fix potential negative return lib/librte_eal/common/malloc_elem.c | 6 ++++++ lib/librte_eal/common/malloc_heap.c | 7 ++++++- lib/librte_eal/common/malloc_mp.c | 23 +++++++++++------------ lib/librte_eal/common/rte_malloc.c | 6 +++++- 4 files changed, 28 insertions(+), 14 deletions(-) -- 2.7.4