From 2ed4858254369f8ca4d37f897bd0ac770ffe53c0 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 18 Jul 2020 00:08:58 -0500 Subject: [PATCH] Security: memory leak due to using _new instead of _resize The array may already be initialized, so use the resize macro instead of the new macro. --- level_0/f_path/c/private-path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/level_0/f_path/c/private-path.c b/level_0/f_path/c/private-path.c index 9f7e8f3..af7627f 100644 --- a/level_0/f_path/c/private-path.c +++ b/level_0/f_path/c/private-path.c @@ -27,7 +27,7 @@ extern "C" { if (length + 1 > real->size) { f_status status = F_none; - f_macro_string_dynamic_new(status, (*real), length + 1); + f_macro_string_dynamic_resize(status, (*real), length + 1); if (F_status_is_error(status)) return status; } -- 1.8.3.1