]> Kevux Git Server - fll/commitdiff
Bugfix: Fake incorrectly builds header file names.
authorKevin Day <thekevinday@gmail.com>
Wed, 4 Nov 2020 02:32:14 +0000 (20:32 -0600)
committerKevin Day <thekevinday@gmail.com>
Wed, 4 Nov 2020 02:32:14 +0000 (20:32 -0600)
The NULL terminating character is not appended after each new header name.
This resulted in garbled header names due to existing content in the buffer.

level_3/fake/c/private-build.c

index 2cb22f45f7f3cc8c98bd023575223624e9b4c653..f0d86db2138a4818bb33e047906589ddbbfcb2da 100644 (file)
@@ -270,6 +270,13 @@ extern "C" {
           break;
         }
 
+        *status = fl_string_dynamic_terminate_after(&destination_file);
+
+        if (F_status_is_error(*status)) {
+          fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true);
+          break;
+        }
+
         if (fake_signal_received(data)) {
           *status = F_status_set_error(F_signal);
           break;