From: Kevin Day Date: Sat, 18 Jul 2020 05:08:58 +0000 (-0500) Subject: Security: memory leak due to using _new instead of _resize X-Git-Tag: 0.5.0~75 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=2ed4858254369f8ca4d37f897bd0ac770ffe53c0;p=fll 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. --- 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; }