From: Kevin Day Date: Fri, 11 Feb 2022 23:22:23 +0000 (-0600) Subject: Regression: Make sure setting.path_pid is NULL terminated. X-Git-Tag: 0.5.8~60 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=10794c11ada096cda2255d2bdd4ff7d0fdc9f480;p=fll Regression: Make sure setting.path_pid is NULL terminated. The libc path functions end up accessing this string. The libc functions require NULL terminated strings. --- diff --git a/level_3/controller/c/controller.c b/level_3/controller/c/controller.c index 3cba463..410d307 100644 --- a/level_3/controller/c/controller.c +++ b/level_3/controller/c/controller.c @@ -308,6 +308,13 @@ extern "C" { if (F_status_is_error(status)) { fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true); } + else { + status = f_string_dynamic_terminate_after(&setting.path_pid); + + if (F_status_is_error(status)) { + fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true); + } + } } if (F_status_is_error_not(status)) {