[dpdk-dev] [PATCH v2] eal/windows: fix out-of-memory check

Ranjit Menon ranjit.menon at intel.com
Tue Feb 18 22:52:31 CET 2020


On 2/17/2020 3:56 PM, Dmitry Kozlyuk wrote:
> Check vsnprintf() result to prevent calling malloc() with negative size.
> Check actual malloc() result and terminate asprintf() with documented
> error code to prevent the use of NULL pointer.
>
> Fixes: e8428a9d8 ("eal/windows: add some basic functions and macros")
>
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
> ---
>   lib/librte_eal/windows/eal/include/rte_os.h | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
>
> v2 Changes:
>      Check vsnprintf() value before appending place for '\0'.
>
Acked-by: Ranjit Menon <ranjit.menon at intel.com>



More information about the dev mailing list