From: Kevin Day Date: Sun, 16 Apr 2023 23:37:18 +0000 (-0500) Subject: Security: fake_build_arguments_standard_add() is treating static path the same as... X-Git-Tag: 0.6.5~13 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=e88597fd8f6e89c3e210ae36ba04e3ef442dab81;p=fll Security: fake_build_arguments_standard_add() is treating static path the same as shared. The size calculation is only using the shared size. Then a static string of a potentially different size is being used. --- diff --git a/level_3/fake/c/private-build.c b/level_3/fake/c/private-build.c index ff4a0f3..d09d700 100644 --- a/level_3/fake/c/private-build.c +++ b/level_3/fake/c/private-build.c @@ -29,7 +29,7 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static if (F_status_is_error(*status)) return; { - f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_s.used + data->path_build_libraries_shared.used; + f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_s.used + (is_shared ? data->path_build_libraries_shared.used : data->path_build_libraries_static.used); f_char_t build_libraries[build_libraries_length + 1]; build_libraries[build_libraries_length] = 0;