[dpdk-dev] [PATCH v2 0/3] Coverity fixes for malloc
Anatoly Burakov
anatoly.burakov at intel.com
Wed Apr 25 12:15:36 CEST 2018
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
More information about the dev
mailing list