[dpdk-dev] [PATCH v2 3/3] malloc: fix potential dereferencing of NULL pointer

Van Haaren, Harry harry.van.haaren at intel.com
Fri Apr 27 17:57:38 CEST 2018


> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Anatoly Burakov
> Sent: Wednesday, April 25, 2018 11:16 AM
> To: dev at dpdk.org
> Cc: thomas at monjalon.net; Burakov, Anatoly <anatoly.burakov at intel.com>
> Subject: [dpdk-dev] [PATCH v2 3/3] malloc: fix potential dereferencing of NULL
> pointer
> 
> Previous code checked for both first/last elements being NULL,
> but if they weren't, the expectation was that they're both
> non-NULL, which will be the case under normal conditions, but
> may not be the case due to heap structure corruption.
> 
> Coverity issue: 272566
> 
> Fixes: bb372060dad4 ("malloc: make heap a doubly-linked list")
> Cc: anatoly.burakov at intel.com
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>

Had to do a double-take there - that's a novel way of checking
pointers - but it actually makes sense here :)

Acked-by: Harry van Haaren <harry.van.haaren at intel.com>


More information about the dev mailing list