From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Apr 2018 08:48:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,464,1517904000"; d="scan'208";a="34051826" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga007.jf.intel.com with ESMTP; 17 Apr 2018 08:48:18 -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 w3HFmH9b030971; Tue, 17 Apr 2018 16:48:18 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id w3HFmH1B024765; Tue, 17 Apr 2018 16:48:17 +0100 Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id w3HFmHDc024761; Tue, 17 Apr 2018 16:48:17 +0100 From: Anatoly Burakov To: dev@dpdk.org Cc: thomas@monjalon.net Date: Tue, 17 Apr 2018 16:48:12 +0100 Message-Id: X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH 0/5] 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: Tue, 17 Apr 2018 15:48:23 -0000 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