Coverity fixes for malloc
Status from this message: Applied, thanks
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 5 repliesApplied
- v15 patches 2 repliesSuperseded
Changes in v2 from the cover letter
- Dropped fixes for 272571, 272590, 272597 as false positives
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | malloc: replace snprintf with strlcpylib/ | +11 | 1 reply | |
| 2/3 | malloc: fix potential out-of-bounds array accesslib/ | +2 | 1 reply | |
| 3/3 | malloc: fix potential dereferencing of NULL pointerlib/ | +6 | 2 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Harry van Haaren |
|---|---|
| 1/3 | A-b |
| 2/3 | A-b |
| 3/3 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] Coverity fixes for malloc
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(-)
Signature · 1 line
2.7.4