]> Kevux Git Server - fll/commitdiff
Security: Wrong variable passed resulting in invalid read and writes in Fake.
authorKevin Day <thekevinday@gmail.com>
Fri, 13 May 2022 00:09:33 +0000 (19:09 -0500)
committerKevin Day <thekevinday@gmail.com>
Fri, 13 May 2022 00:09:33 +0000 (19:09 -0500)
level_3/fake/c/private-make-load_fakefile.c
level_3/fake/c/private-make-operate.c

index d901523dc010d20bfef3de1a627d5dd8a8885db6..4bb5ba338d0758215ec6d54613597b3947b52f0e 100644 (file)
@@ -53,7 +53,7 @@ extern "C" {
       f_string_range_t range = macro_f_string_range_t_initialize2(data_make->buffer.used);
       f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
       f_fss_comments_t comments = f_fss_comments_t_initialize;
-      f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) data_make->data, 0);
+      f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) data_make->main, 0);
 
       *status = fll_fss_basic_list_read(data_make->buffer, state, &range, &list_objects, &list_contents, &delimits, 0, &comments);
 
@@ -85,7 +85,7 @@ extern "C" {
 
       f_fss_set_t settings = f_fss_set_t_initialize;
 
-      f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) data_make->data, 0);
+      f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) data_make->main, 0);
 
       if (list_objects.used > data_make->fakefile.size) {
         macro_f_fss_nameds_t_resize((*status), data_make->fakefile, list_objects.used);
index e6f8a563e0cdab7a7d52874f77d53c6b33ee79f4..cd76300cf9bc752fb5982bfaa13183a56179a281 100644 (file)
@@ -122,7 +122,7 @@ extern "C" {
     }
 
     if (status != F_child) {
-      f_status_t status_path = f_path_change_at(data_make.path.top.id);
+      const f_status_t status_path = f_path_change_at(data_make.path.top.id);
 
       if (F_status_is_error(status_path) && data->main->warning.verbosity >= f_console_verbosity_verbose_e) {
         flockfile(data->main->warning.to.stream);
@@ -167,7 +167,7 @@ extern "C" {
 
     f_iki_data_t iki_data = f_iki_data_t_initialize;
 
-    f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) data_make->data, 0);
+    f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) data_make->main, 0);
 
     f_string_range_t range = f_string_range_t_initialize;
     f_string_map_multis_t *parameter = &data_make->setting_make.parameter;