]> Kevux Git Server - fll/commitdiff
Update: Switch to explicitly using sizeof() for char memset() and memcpy().
authorKevin Day <thekevinday@gmail.com>
Tue, 8 Mar 2022 03:46:17 +0000 (21:46 -0600)
committerKevin Day <thekevinday@gmail.com>
Tue, 8 Mar 2022 03:46:17 +0000 (21:46 -0600)
Different architectures might not actually have a 1-byte size.
Rather than assuming the common behavior, always call sizeof(unsigned char) to determine size of memset() and mempcy() functions.

43 files changed:
level_0/f_account/c/account.c
level_0/f_account/c/private-account.c
level_0/f_capability/c/capability.c
level_0/f_color/c/color.c
level_0/f_directory/c/directory.c
level_0/f_environment/c/environment.c
level_0/f_file/c/file.c
level_0/f_file/c/private-file.c
level_0/f_path/c/path.c
level_0/f_path/c/private-path.c
level_0/f_serialize/c/serialize.c
level_0/f_string/c/private-string.c
level_0/f_utf/c/utf.c
level_0/f_utf/c/utf/private-string.c
level_1/fl_control_group/c/control_group.c
level_1/fl_directory/c/directory.c
level_1/fl_directory/c/private-directory.c
level_1/fl_environment/c/environment.c
level_1/fl_print/c/private-print.c
level_1/fl_utf_file/c/private-utf_file.c
level_2/fll_control_group/c/control_group.c
level_2/fll_execute/c/execute.c
level_2/fll_execute/c/private-execute.c
level_2/fll_file/c/private-file.c
level_2/fll_fss/c/fss/payload.c
level_3/controller/c/control/private-control.c
level_3/controller/c/controller/private-controller.c
level_3/controller/c/entry/private-entry.c
level_3/controller/c/rule/private-rule.c
level_3/fake/c/private-build-library.c
level_3/fake/c/private-build-load.c
level_3/fake/c/private-build-object.c
level_3/fake/c/private-build-objects.c
level_3/fake/c/private-build-program.c
level_3/fake/c/private-build-skeleton.c
level_3/fake/c/private-build.c
level_3/fake/c/private-make-operate_process_type.c
level_3/fake/c/private-make-operate_validate.c
level_3/fake/c/private-skeleton.c
level_3/firewall/c/firewall.c
level_3/firewall/c/private-firewall.c
level_3/fss_embedded_list_read/c/private-read.c
level_3/fss_payload_write/c/private-write.c

index 13c6d3df1dc102bfed87e082fc4c3c977b575526..4236c5c569ac341b89226812036d3fc06877226f 100644 (file)
@@ -297,7 +297,7 @@ extern "C" {
         macro_f_string_dynamic_t_resize(status, (*name), name_length + 1);
         if (F_status_is_error(status)) return status;
 
-        memcpy(name->string, group_data.gr_name, name_length);
+        memcpy(name->string, group_data.gr_name, sizeof(unsigned char) * name_length);
 
         name->string[name_length] = 0;
         name->used = name_length;
@@ -332,7 +332,7 @@ extern "C" {
     macro_f_string_dynamic_t_resize(status, (*name), name_length + 1);
     if (F_status_is_error(status)) return status;
 
-    memcpy(name->string, group_data.gr_name, name_length);
+    memcpy(name->string, group_data.gr_name, sizeof(unsigned char) * name_length);
 
     name->string[name_length] = 0;
     name->used = name_length;
@@ -471,7 +471,7 @@ extern "C" {
         macro_f_string_dynamic_t_resize(status, (*name), name_length + 1);
         if (F_status_is_error(status)) return status;
 
-        memcpy(name->string, password.pw_name, name_length);
+        memcpy(name->string, password.pw_name, sizeof(unsigned char) * name_length);
 
         name->string[name_length] = 0;
         name->used = name_length;
@@ -506,7 +506,7 @@ extern "C" {
     macro_f_string_dynamic_t_resize(status, (*name), name_length + 1);
     if (F_status_is_error(status)) return status;
 
-    memcpy(name->string, password.pw_name, name_length);
+    memcpy(name->string, password.pw_name, sizeof(unsigned char) * name_length);
 
     name->string[name_length] = 0;
     name->used = name_length;
index 307d207d7c99da9c629e62ac24ea9dcfb9af0537..88ad94424fbf514ab330836e4f28015b42861ab6 100644 (file)
@@ -20,7 +20,7 @@ extern "C" {
     status = f_string_dynamic_resize(string_length + 1, &account->home);
     if (F_status_is_error(status)) return status;
 
-    memcpy(account->home.string, password.pw_dir, string_length);
+    memcpy(account->home.string, password.pw_dir, sizeof(unsigned char) * string_length);
 
     account->home.string[string_length] = 0;
     account->home.used = string_length;
@@ -31,7 +31,7 @@ extern "C" {
     status = f_string_dynamic_resize(string_length + 1, &account->label);
     if (F_status_is_error(status)) return status;
 
-    memcpy(account->label.string, password.pw_gecos, string_length);
+    memcpy(account->label.string, password.pw_gecos, sizeof(unsigned char) * string_length);
 
     account->label.string[string_length] = 0;
     account->label.used = string_length;
@@ -42,7 +42,7 @@ extern "C" {
     status = f_string_dynamic_resize(string_length + 1, &account->name);
     if (F_status_is_error(status)) return status;
 
-    memcpy(account->name.string, password.pw_name, string_length);
+    memcpy(account->name.string, password.pw_name, sizeof(unsigned char) * string_length);
 
     account->name.string[string_length] = 0;
     account->name.used = string_length;
@@ -53,7 +53,7 @@ extern "C" {
     status = f_string_dynamic_resize(string_length + 1, &account->password);
     if (F_status_is_error(status)) return status;
 
-    memcpy(account->password.string, password.pw_passwd, string_length);
+    memcpy(account->password.string, password.pw_passwd, sizeof(unsigned char) * string_length);
 
     account->password.string[string_length] = 0;
     account->password.used = string_length;
@@ -64,7 +64,7 @@ extern "C" {
     status = f_string_dynamic_resize(string_length + 1, &account->shell);
     if (F_status_is_error(status)) return status;
 
-    memcpy(account->shell.string, password.pw_shell, string_length);
+    memcpy(account->shell.string, password.pw_shell, sizeof(unsigned char) * string_length);
 
     account->shell.string[string_length] = 0;
     account->shell.used = string_length;
index 3c302b9066f1e43866c2506b7102a5355c6a617e..ac5294166263c82a4f8105cfca5ff7ef65d960a7 100644 (file)
@@ -1067,7 +1067,7 @@ extern "C" {
           }
         }
 
-        memcpy(name->string + name->used, result, length);
+        memcpy(name->string + name->used, result, sizeof(unsigned char) * length);
         name->used += length;
         name->string[name->used] = 0;
 
@@ -1108,7 +1108,7 @@ extern "C" {
           }
         }
 
-        memcpy(text->string + text->used, result, length);
+        memcpy(text->string + text->used, result, sizeof(unsigned char) * length);
         text->used += length;
         text->string[text->used] = 0;
 
index b79f05c52c3bee08b7951692cb8414325f495537..f2b9e12911d792342f7acc2acd92dcf70c0b5902 100644 (file)
@@ -123,19 +123,19 @@ extern "C" {
     if (F_status_is_error(status)) return status;
 
     if (format.begin.used) {
-      memcpy(buffer->string + buffer->used, format.begin.string, format.begin.used);
+      memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
 
       buffer->used += format.begin.used;
     }
 
     if (color1.used) {
-      memcpy(buffer->string + buffer->used, color1.string, color1.used);
+      memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
 
       buffer->used += color1.used;
     }
 
     if (format.end.used) {
-      memcpy(buffer->string + buffer->used, format.end.string, format.end.used);
+      memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
 
       buffer->used += format.end.used;
     }
@@ -158,31 +158,31 @@ extern "C" {
     if (F_status_is_error(status)) return status;
 
     if (format.begin.used) {
-      memcpy(buffer->string + buffer->used, format.begin.string, format.begin.used);
+      memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
 
       buffer->used += format.begin.used;
     }
 
     if (color1.used) {
-      memcpy(buffer->string + buffer->used, color1.string, color1.used);
+      memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
 
       buffer->used += color1.used;
     }
 
     if (format.medium.used) {
-      memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+      memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
 
       buffer->used += format.medium.used;
     }
 
     if (color2.used) {
-      memcpy(buffer->string + buffer->used, color2.string, color2.used);
+      memcpy(buffer->string + buffer->used, color2.string, sizeof(unsigned char) * color2.used);
 
       buffer->used += color2.used;
     }
 
     if (format.end.used) {
-      memcpy(buffer->string + buffer->used, format.end.string, format.end.used);
+      memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
 
       buffer->used += format.end.used;
     }
@@ -205,43 +205,43 @@ extern "C" {
     if (F_status_is_error(status)) return status;
 
     if (format.begin.used) {
-      memcpy(buffer->string + buffer->used, format.begin.string, format.begin.used);
+      memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
 
       buffer->used += format.begin.used;
     }
 
     if (color1.used) {
-      memcpy(buffer->string + buffer->used, color1.string, color1.used);
+      memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
 
       buffer->used += color1.used;
     }
 
     if (format.medium.used) {
-      memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+      memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
 
       buffer->used += format.medium.used;
     }
 
     if (color2.used) {
-      memcpy(buffer->string + buffer->used, color2.string, color2.used);
+      memcpy(buffer->string + buffer->used, color2.string, sizeof(unsigned char) * color2.used);
 
       buffer->used += color2.used;
     }
 
     if (format.medium.used) {
-      memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+      memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
 
       buffer->used += format.medium.used;
     }
 
     if (color3.used) {
-      memcpy(buffer->string + buffer->used, color3.string, color3.used);
+      memcpy(buffer->string + buffer->used, color3.string, sizeof(unsigned char) * color3.used);
 
       buffer->used += color3.used;
     }
 
     if (format.end.used) {
-      memcpy(buffer->string + buffer->used, format.end.string, format.end.used);
+      memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
 
       buffer->used += format.end.used;
     }
@@ -264,55 +264,55 @@ extern "C" {
     if (F_status_is_error(status)) return status;
 
     if (format.begin.used) {
-      memcpy(buffer->string + buffer->used, format.begin.string, format.begin.used);
+      memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
 
       buffer->used += format.begin.used;
     }
 
     if (color1.used) {
-      memcpy(buffer->string + buffer->used, color1.string, color1.used);
+      memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
 
       buffer->used += color1.used;
     }
 
     if (format.medium.used) {
-      memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+      memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
 
       buffer->used += format.medium.used;
     }
 
     if (color2.used) {
-      memcpy(buffer->string + buffer->used, color2.string, color2.used);
+      memcpy(buffer->string + buffer->used, color2.string, sizeof(unsigned char) * color2.used);
 
       buffer->used += color2.used;
     }
 
     if (format.medium.used) {
-      memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+      memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
 
       buffer->used += format.medium.used;
     }
 
     if (color3.used) {
-      memcpy(buffer->string + buffer->used, color3.string, color3.used);
+      memcpy(buffer->string + buffer->used, color3.string, sizeof(unsigned char) * color3.used);
 
       buffer->used += color3.used;
     }
 
     if (format.medium.used) {
-      memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+      memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
 
       buffer->used += format.medium.used;
     }
 
     if (color4.used) {
-      memcpy(buffer->string + buffer->used, color4.string, color4.used);
+      memcpy(buffer->string + buffer->used, color4.string, sizeof(unsigned char) * color4.used);
 
       buffer->used += color4.used;
     }
 
     if (format.end.used) {
-      memcpy(buffer->string + buffer->used, format.end.string, format.end.used);
+      memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
 
       buffer->used += format.end.used;
     }
@@ -335,67 +335,67 @@ extern "C" {
     if (F_status_is_error(status)) return status;
 
     if (format.begin.used) {
-      memcpy(buffer->string + buffer->used, format.begin.string, format.begin.used);
+      memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
 
       buffer->used += format.begin.used;
     }
 
     if (color1.used) {
-      memcpy(buffer->string + buffer->used, color1.string, color1.used);
+      memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
 
       buffer->used += color1.used;
     }
 
     if (format.medium.used) {
-      memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+      memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
 
       buffer->used += format.medium.used;
     }
 
     if (color2.used) {
-      memcpy(buffer->string + buffer->used, color2.string, color2.used);
+      memcpy(buffer->string + buffer->used, color2.string, sizeof(unsigned char) * color2.used);
 
       buffer->used += color2.used;
     }
 
     if (format.medium.used) {
-      memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+      memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
 
       buffer->used += format.medium.used;
     }
 
     if (color3.used) {
-      memcpy(buffer->string + buffer->used, color3.string, color3.used);
+      memcpy(buffer->string + buffer->used, color3.string, sizeof(unsigned char) * color3.used);
 
       buffer->used += color3.used;
     }
 
     if (format.medium.used) {
-      memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+      memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
 
       buffer->used += format.medium.used;
     }
 
     if (color4.used) {
-      memcpy(buffer->string + buffer->used, color4.string, color4.used);
+      memcpy(buffer->string + buffer->used, color4.string, sizeof(unsigned char) * color4.used);
 
       buffer->used += color4.used;
     }
 
     if (format.medium.used) {
-      memcpy(buffer->string + buffer->used, format.medium.string, format.medium.used);
+      memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
 
       buffer->used += format.medium.used;
     }
 
     if (color5.used) {
-      memcpy(buffer->string + buffer->used, color5.string, color5.used);
+      memcpy(buffer->string + buffer->used, color5.string, sizeof(unsigned char) * color5.used);
 
       buffer->used += color5.used;
     }
 
     if (format.end.used) {
-      memcpy(buffer->string + buffer->used, format.end.string, format.end.used);
+      memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
 
       buffer->used += format.end.used;
     }
index f3ba1a8cc380c880ec39584b71bb86ef075f9ec9..0b0af330181ab2112ff6cbc093b73c86942ed14f 100644 (file)
@@ -203,7 +203,7 @@ extern "C" {
       status = f_string_dynamic_increase_by(size, &names->array[names->used]);
       if (F_status_is_error(status)) break;
 
-      memcpy(names->array[names->used].string, listing[i]->d_name, size);
+      memcpy(names->array[names->used].string, listing[i]->d_name, sizeof(unsigned char) * size);
       names->array[names->used++].used = size;
 
       f_memory_delete(size, sizeof(unsigned char *), (void **) & listing[i]);
index 5598b6557c3d4d6ddca2228d7b8ae5a1610545f7..0a39c82ce58f0b3106abf849182456b21e5cff24 100644 (file)
@@ -52,7 +52,7 @@ extern "C" {
       const f_status_t status = f_string_dynamic_increase_by(size + 1, value);
       if (F_status_is_error(status)) return status;
 
-      memcpy(value->string + value->used, result, size);
+      memcpy(value->string + value->used, result, sizeof(unsigned char) * size);
 
       value->used += size;
       value->string[value->used] = 0;
index 6d213d73af1c86c0154da6af26445d3116eff8b5..d9a5c58388423032029df12c12221885fcac3af8 100644 (file)
@@ -1395,7 +1395,7 @@ extern "C" {
     unsigned char path_argument[path.used + 1];
     f_string_t path_to_name;
 
-    memcpy(path_argument, path.string, path.used);
+    memcpy(path_argument, path.string, sizeof(unsigned char) * path.used);
     path_argument[path.used] = 0;
 
     path_to_name = basename(path_argument);
@@ -1405,7 +1405,7 @@ extern "C" {
     const f_status_t status = f_string_dynamic_increase_by(size + 1, name_base);
     if (F_status_is_error(status)) return status;
 
-    memcpy(name_base->string + name_base->used, path_to_name, size);
+    memcpy(name_base->string + name_base->used, path_to_name, sizeof(unsigned char) * size);
     name_base->used += size;
     name_base->string[name_base->used] = 0;
 
@@ -1427,7 +1427,7 @@ extern "C" {
     unsigned char path_argument[path.used + 1];
     f_string_t path_to_name;
 
-    memcpy(path_argument, path.string, path.used);
+    memcpy(path_argument, path.string, sizeof(unsigned char) * path.used);
     path_argument[path.used] = 0;
 
     path_to_name = dirname(path_argument);
@@ -1444,7 +1444,7 @@ extern "C" {
       if (F_status_is_error(status)) return status;
     }
 
-    memcpy(name_directory->string + name_directory->used, path_to_name, size);
+    memcpy(name_directory->string + name_directory->used, path_to_name, sizeof(unsigned char) * size);
     name_directory->used += size;
     name_directory->string[name_directory->used] = 0;
 
index b1ced975137b0a9fb07b1c1981b056e756ef8dc3..0c078b37fb7dd5231eb191ead410f8ea6b30c1bb 100644 (file)
@@ -62,7 +62,7 @@ extern "C" {
     ssize_t size_write = 0;
     unsigned char *buffer[size_block];
 
-    memset(buffer, 0, size_block);
+    memset(buffer, 0, sizeof(unsigned char) * size_block);
 
     while ((size_read = read(file_source.id, buffer, size_block)) > 0) {
 
@@ -111,7 +111,7 @@ extern "C" {
     ssize_t size_write = 0;
     unsigned char *buffer[size_block];
 
-    memset(buffer, 0, size_block);
+    memset(buffer, 0, sizeof(unsigned char) * size_block);
 
     while ((size_read = read(file_source.id, buffer, size_block)) > 0) {
 
@@ -416,7 +416,7 @@ extern "C" {
       if (F_status_is_error(status)) return status;
     }
 
-    memset(target->string, 0, target->used + 1);
+    memset(target->string, 0, sizeof(unsigned char) * (target->used + 1));
 
     target->used = link_stat.st_size;
 
@@ -453,7 +453,7 @@ extern "C" {
       if (F_status_is_error(status)) return status;
     }
 
-    memset(target->string, 0, target->used + 1);
+    memset(target->string, 0, sizeof(unsigned char) * (target->used + 1));
 
     target->used = link_stat.st_size;
 
index 817ac5470c455f86f276aae65f5c5d6b146ef2d4..85ea51ca8754829a617cd1bcd5b66cdd857c42d9 100644 (file)
@@ -82,7 +82,7 @@ extern "C" {
       if (F_status_is_error(status)) return status;
     }
 
-    memcpy(path->string, buffer, length);
+    memcpy(path->string, buffer, sizeof(unsigned char) * length);
 
     path->string[length] = 0;
     path->used = length;
@@ -140,7 +140,7 @@ extern "C" {
         } // while
 
         // Use memcpy() to take advantage of its optimized copy behaviors whenever possible.
-        memcpy(directory->string + directory->used, argument.string + i, j - i);
+        memcpy(directory->string + directory->used, argument.string + i, sizeof(unsigned char) * (j - i));
 
         directory->used += j - i;
         i = j;
index 2b78028348b4c5c29e0bbc40ccb80dde0d2d2873..d246947d8b7d27a8653f233ab28a34d012d5e0fa 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
       if (F_status_is_error(status)) return status;
     }
 
-    memcpy(real->string, buffer, length);
+    memcpy(real->string, buffer, sizeof(unsigned char) * length);
 
     real->string[length] = 0;
     real->used = length;
index a3ddc65d65a78042a6e92ebb701300ff0827fdab..4efa17ca7796741b07b940bae7cf58e7831d8a63 100644 (file)
@@ -19,12 +19,12 @@ extern "C" {
     }
 
     if (!serialize->used) {
-      memcpy(serialize->string + serialize->used, value.string, value.used);
+      memcpy(serialize->string + serialize->used, value.string, sizeof(unsigned char) * value.used);
       serialize->used += value.used;
     }
     else {
-      memcpy(serialize->string + serialize->used, f_serialize_simple_splitter_s.string, f_serialize_simple_splitter_s.used);
-      memcpy(serialize->string + serialize->used + f_serialize_simple_splitter_s.used, value.string, value.used);
+      memcpy(serialize->string + serialize->used, f_serialize_simple_splitter_s.string, sizeof(unsigned char) * f_serialize_simple_splitter_s.used);
+      memcpy(serialize->string + serialize->used + f_serialize_simple_splitter_s.used, value.string, sizeof(unsigned char) * value.used);
       serialize->used += value.used + 1;
     }
 
@@ -78,7 +78,7 @@ extern "C" {
             strings->array[strings->used].size = total;
           }
 
-          memcpy(strings->array[strings->used].string, serialize.string + start, total);
+          memcpy(strings->array[strings->used].string, serialize.string + start, sizeof(unsigned char) * total);
 
           strings->array[strings->used].used = total;
           ++strings->used;
@@ -195,7 +195,7 @@ extern "C" {
       if (F_status_is_error(status_allocation)) return status_allocation;
     }
 
-    memcpy(dynamic->string, serialize.string + range.start, total);
+    memcpy(dynamic->string, serialize.string + range.start, sizeof(unsigned char) * total);
     dynamic->used = total;
 
     return status;
index 56b6bbe486b9e0269fa46b978b5e316ba3ac24fd..cce5280432aa09aa7a0bd2b13990e5c6f780170c 100644 (file)
@@ -13,7 +13,7 @@ extern "C" {
       if (F_status_is_error(status)) return status;
     }
 
-    memcpy(destination->string + destination->used, source, length);
+    memcpy(destination->string + destination->used, source, sizeof(unsigned char) * length);
     destination->used += length;
     destination->string[destination->used] = 0;
 
@@ -48,7 +48,7 @@ extern "C" {
       if (i && i > first) {
         size = i - first;
 
-        memcpy(destination->string + destination->used, source + first, size);
+        memcpy(destination->string + destination->used, source + first, sizeof(unsigned char) * size);
         destination->used += size;
       }
 
@@ -62,7 +62,7 @@ extern "C" {
     if (i > first) {
       size = i - first;
 
-      memcpy(destination->string + destination->used, source + first, size);
+      memcpy(destination->string + destination->used, source + first, sizeof(unsigned char) * size);
       destination->used += size;
     }
 
@@ -661,10 +661,10 @@ extern "C" {
 
     if (destination->used) {
       memmove(destination->string + length, destination->string, destination->used);
-      memcpy(destination->string, source, length);
+      memcpy(destination->string, source, sizeof(unsigned char) * length);
     }
     else {
-      memcpy(destination->string, source, length);
+      memcpy(destination->string, source, sizeof(unsigned char) * length);
     }
 
     destination->used += length;
@@ -718,7 +718,7 @@ extern "C" {
             }
 
             memmove(destination->string + offset + size, destination->string + offset, destination->used - offset);
-            memcpy(destination->string + offset, source + first, size);
+            memcpy(destination->string + offset, source + first, sizeof(unsigned char) * size);
 
             destination->used += size;
             offset += size;
index e3a26c6987a9b3f820d16c637bd9d4d8f35c6654..c11bb62d42d40ab17a556532bc78f9ed47a95c2b 100644 (file)
@@ -694,9 +694,9 @@ extern "C" {
             return F_status_set_error(F_failure);
         }
 
-        memcpy(*character, &utf, macro_f_utf_character_t_width_is(utf_character));
+        memcpy(*character, &utf, sizeof(unsigned char) * macro_f_utf_character_t_width_is(utf_character));
       #else
-        memcpy(*character, &utf_character, macro_f_utf_character_t_width_is(utf_character));
+        memcpy(*character, &utf_character, sizeof(unsigned char) * macro_f_utf_character_t_width_is(utf_character));
       #endif // __BYTE_ORDER == __LITTLE_ENDIAN
 
       return F_none;
@@ -705,9 +705,9 @@ extern "C" {
     #if __BYTE_ORDER == __LITTLE_ENDIAN
       uint32_t utf = macro_f_utf_character_t_to_char_1(utf_character) << 24;
 
-      memcpy(*character, &utf, 1);
+      memcpy(*character, &utf, sizeof(unsigned char));
     #else
-      memcpy(*character, &utf_character, 1);
+      memcpy(*character, &utf_character, sizeof(unsigned char));
     #endif // __BYTE_ORDER == __LITTLE_ENDIAN
 
     return F_none;
index ca8b2427ef306c4f0f96f929c12c1b60062ca5cd..1a45f5266d4de1489857faff88bd8eb8a1def910 100644 (file)
@@ -13,7 +13,7 @@ extern "C" {
       if (F_status_is_error(status)) return status;
     }
 
-    memcpy(destination->string + destination->used, source, length);
+    memcpy(destination->string + destination->used, source, sizeof(unsigned char) * length);
     destination->used = destination->used + length;
 
     return F_none;
@@ -45,7 +45,7 @@ extern "C" {
           if (F_status_is_error(status)) return status;
         }
 
-        memcpy(destination->string + destination->used, source + first, size);
+        memcpy(destination->string + destination->used, source + first, sizeof(unsigned char) * size);
         destination->used = destination->used + size;
       }
 
@@ -64,7 +64,7 @@ extern "C" {
         if (F_status_is_error(status)) return status;
       }
 
-      memcpy(destination->string + destination->used, source + first, size);
+      memcpy(destination->string + destination->used, source + first, sizeof(unsigned char) * size);
       destination->used = destination->used + size;
     }
 
@@ -344,10 +344,10 @@ extern "C" {
 
     if (destination->used) {
       memmove(destination->string + length, destination->string, destination->used);
-      memcpy(destination->string, source, length);
+      memcpy(destination->string, source, sizeof(unsigned char) * length);
     }
     else {
-      memcpy(destination->string, source, length);
+      memcpy(destination->string, source, sizeof(unsigned char) * length);
     }
 
     destination->used = destination->used + length;
@@ -381,7 +381,7 @@ extern "C" {
           }
 
           memmove(destination->string + offset + size, destination->string + offset, destination->used - offset);
-          memcpy(destination->string + offset, source + first, size);
+          memcpy(destination->string + offset, source + first, sizeof(unsigned char) * size);
 
           destination->used = destination->used + size;
           offset += size;
@@ -401,7 +401,7 @@ extern "C" {
             }
 
             memmove(destination->string + offset + size, destination->string + offset, destination->used - offset);
-            memcpy(destination->string + offset, source + first, size);
+            memcpy(destination->string + offset, source + first, sizeof(unsigned char) * size);
 
             destination->used = destination->used + size;
             offset += size;
index 787132d4243ebb9581c94681321b27306c290e54..ef685ccd354d03eaf1ea3d12a25601edbfed71ad 100644 (file)
@@ -35,11 +35,11 @@ extern "C" {
       path.string = path_string;
 
       if (control_group.path.used) {
-        memcpy(path.string, control_group.path.string, control_group.path.used);
+        memcpy(path.string, control_group.path.string, sizeof(unsigned char) * control_group.path.used);
       }
 
-      memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, control_group.groups.array[i].used);
-      memcpy(path.string + control_group.path.used + F_control_group_path_system_default_s_length, F_control_group_path_system_suffix_s, F_control_group_path_system_suffix_s_length);
+      memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, sizeof(unsigned char) * control_group.groups.array[i].used);
+      memcpy(path.string + control_group.path.used + F_control_group_path_system_default_s_length, F_control_group_path_system_suffix_s, sizeof(unsigned char) * F_control_group_path_system_suffix_s_length);
 
       path.string[path.used] = 0;
 
index 9cdefcd69d51efd0bde5ead2b2ef05f3d6a56d0a..8df9af257832ced716c93f670cda75a9b04feefb 100644 (file)
@@ -35,7 +35,7 @@ extern "C" {
       for (; at_path < path.used; ++at_path) {
 
         if (at_path && path.string[at_path] == f_path_separator_s.string[0]) {
-          memcpy(tree.string, path.string + at_tree, at_path - at_tree);
+          memcpy(tree.string, path.string + at_tree, sizeof(unsigned char) * (at_path - at_tree));
           tree.string[at_path - at_tree] = 0;
 
           status = f_directory_exists(tree);
index 7a3e8172692756d4c9350c247884fc2999d883ed..9009d4c994c07675fc1601a7b1bb5cfec6b95ed5 100644 (file)
@@ -61,11 +61,11 @@ extern "C" {
       unsigned char path_source_sub[source_sub.used + 1];
       unsigned char path_destination_sub[destination_sub.used + 1];
 
-      memcpy(path_source_sub, source.string, source.used);
-      memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+      memcpy(path_source_sub, source.string, sizeof(unsigned char) * source.used);
+      memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
 
-      memcpy(path_destination_sub, destination.string, destination.used);
-      memcpy(path_destination_sub + destination.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+      memcpy(path_destination_sub, destination.string, sizeof(unsigned char) * destination.used);
+      memcpy(path_destination_sub + destination.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
 
       path_source_sub[source.used] = f_path_separator_s.string[0];
       path_source_sub[source_sub.used] = 0;
@@ -152,13 +152,13 @@ extern "C" {
     path_source.string = path_source_string;
     path_destination.string = path_destination_string;
 
-    memcpy(path_source_string, source.string, source.used);
-    memcpy(path_source_string + source.used + 1, file.string, file.used);
+    memcpy(path_source_string, source.string, sizeof(unsigned char) * source.used);
+    memcpy(path_source_string + source.used + 1, file.string, sizeof(unsigned char) * file.used);
     path_source_string[source.used] = f_path_separator_s.string[0];
     path_source_string[source.used + file.used + 1] = 0;
 
-    memcpy(path_destination_string, destination.string, destination.used);
-    memcpy(path_destination_string + destination.used + 1, file.string, file.used);
+    memcpy(path_destination_string, destination.string, sizeof(unsigned char) * destination.used);
+    memcpy(path_destination_string + destination.used + 1, file.string, sizeof(unsigned char) * file.used);
     path_destination_string[destination.used] = f_path_separator_s.string[0];
     path_destination_string[destination.used + file.used + 1] = 0;
 
@@ -196,7 +196,7 @@ extern "C" {
         macro_f_directory_status_t_resize(status, failure, size + 1);
         if (F_status_is_error(status)) return status;
 
-        memcpy(failure.path.string, path_source.string, size);
+        memcpy(failure.path.string, path_source.string, sizeof(unsigned char) * size);
         failure.path.string[size] = 0;
       }
       else {
@@ -210,7 +210,7 @@ extern "C" {
         macro_f_directory_status_t_resize(status, failure, size + 1);
         if (F_status_is_error(status)) return status;
 
-        memcpy(failure.path.string, path_destination.string, size);
+        memcpy(failure.path.string, path_destination.string, sizeof(unsigned char) * size);
         failure.path.string[size] = 0;
       }
 
@@ -286,11 +286,11 @@ extern "C" {
       unsigned char path_source_sub[source_sub.used + 1];
       unsigned char path_destination_sub[destination_sub.used + 1];
 
-      memcpy(path_source_sub, source.string, source.used);
-      memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+      memcpy(path_source_sub, source.string, sizeof(unsigned char) * source.used);
+      memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
 
       memcpy(path_destination_sub, destination.string, destination.used);
-      memcpy(path_destination_sub + destination.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+      memcpy(path_destination_sub + destination.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
 
       path_source_sub[source.used] = f_path_separator_s.string[0];
       path_source_sub[source_sub.used] = 0;
@@ -364,13 +364,13 @@ extern "C" {
     path_source.string = path_source_string;
     path_destination.string = path_destination_string;
 
-    memcpy(path_source_string, source.string, source.used);
-    memcpy(path_source_string + source.used + 1, file.string, file.used);
+    memcpy(path_source_string, source.string, sizeof(unsigned char) * source.used);
+    memcpy(path_source_string + source.used + 1, file.string, sizeof(unsigned char) * file.used);
     path_source_string[source.used] = f_path_separator_s.string[0];
     path_source_string[source.used + file.used + 1] = 0;
 
-    memcpy(path_destination_string, destination.string, destination.used);
-    memcpy(path_destination_string + destination.used + 1, file.string, file.used);
+    memcpy(path_destination_string, destination.string, sizeof(unsigned char) * destination.used);
+    memcpy(path_destination_string + destination.used + 1, file.string, sizeof(unsigned char) * file.used);
     path_destination_string[destination.used] = f_path_separator_s.string[0];
     path_destination_string[destination.used + file.used + 1] = 0;
 
@@ -411,7 +411,7 @@ extern "C" {
         macro_f_directory_status_t_resize(status, failure, size + 1);
         if (F_status_is_error(status)) return status;
 
-        memcpy(failure.path.string, path_source.string, size);
+        memcpy(failure.path.string, path_source.string, sizeof(unsigned char) * size);
         failure.path.string[size] = 0;
       }
       else {
@@ -425,7 +425,7 @@ extern "C" {
         macro_f_directory_status_t_resize(status, failure, size + 1);
         if (F_status_is_error(status)) return status;
 
-        memcpy(failure.path.string, path_destination.string, size);
+        memcpy(failure.path.string, path_destination.string, sizeof(unsigned char) * size);
         failure.path.string[size] = 0;
       }
 
@@ -549,7 +549,7 @@ extern "C" {
       status = f_string_dynamic_increase_by(name_directory.used, &names->array[names->used]);
       if (F_status_is_error(status)) break;
 
-      memcpy(names->array[names->used].string, name_directory.string, name_directory.used);
+      memcpy(names->array[names->used].string, name_directory.string, sizeof(unsigned char) * name_directory.used);
       names->array[names->used++].used = name_directory.used;
 
       f_memory_resize(1, 0, sizeof(unsigned char *), (void **) & entity[i]);
@@ -762,7 +762,7 @@ extern "C" {
     }
 
     if (length_truncated - start > 0) {
-      memcpy(destination->string + destination->used, source.string + start, length_truncated - start);
+      memcpy(destination->string + destination->used, source.string + start, sizeof(unsigned char) * (length_truncated - start));
     }
 
     destination->used += total;
index 7e860ad2b6e4017902c7e2b9c316d66460815d19..665aaa8f2678af2b99efdedadf4cb5be2ba572f8 100644 (file)
@@ -139,7 +139,7 @@ extern "C" {
           status = f_string_dynamic_increase_by(k, &paths->array[paths->used]);
           if (F_status_is_error(status)) return status;
 
-          memcpy(paths->array[paths->used].string, buffer, k);
+          memcpy(paths->array[paths->used].string, buffer, sizeof(unsigned char) * k);
 
           paths->array[paths->used++].used = k;
         }
@@ -217,7 +217,7 @@ extern "C" {
           status = f_string_dynamic_increase_by(k, &paths->array[paths->used]);
           if (F_status_is_error(status)) return status;
 
-          memcpy(paths->array[paths->used].string, buffer, k);
+          memcpy(paths->array[paths->used].string, buffer, sizeof(unsigned char) * k);
 
           paths->array[paths->used++].used = k;
         }
index 31884ab92784612dd6c139c3b04136017f515574..bea842926a8bc696bf1c5d9400e5131874b83ce9 100644 (file)
@@ -1085,8 +1085,8 @@ extern "C" {
             unsigned char format[33];
             unsigned char buffer[129];
 
-            memset(format, 0, 33);
-            memset(buffer, 0, 129);
+            memset(format, 0, sizeof(unsigned char) * 33);
+            memset(buffer, 0, sizeof(unsigned char) * 129);
 
             format[f++] = f_string_ascii_percent_s.string[0];
 
index f8e7bc2fc4630ef10b4f6bda16e70ebe8399620c..fe733d9b2f1ce1c962070ea016d1ffd1b3b1ed40 100644 (file)
@@ -93,7 +93,7 @@ extern "C" {
     // @todo this needs to identify an invalid UTF-8 string before writing and return an error if invalid.
 
     do {
-      memset(buffer_write, 0, write_size);
+      memset(buffer_write, 0, sizeof(unsigned char) * write_size);
 
       for (i = 0, used = 0; used < write_size && *written + i < write_max; ++i, used += width) {
 
index 6a5b9fe9a47434a9bafdc04d6541447cb377dab8..f545c245c93e8f5ca8383c2cca9ed365c21b83e9 100644 (file)
@@ -30,10 +30,10 @@ extern "C" {
       path.string = path_string;
 
       if (control_group.path.used) {
-        memcpy(path.string, control_group.path.string, control_group.path.used);
+        memcpy(path.string, control_group.path.string, sizeof(unsigned char) * control_group.path.used);
       }
 
-      memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, control_group.groups.array[i].used);
+      memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, sizeof(unsigned char) * control_group.groups.array[i].used);
       path.string[path.used] = 0;
 
       status = fl_directory_create(path, F_file_mode_all_rwx_d);
index 8b781bfd1b2879baf4e363ed2f5eb93d68d829f1..55500b5e2cd964b76b70089b3210accb552613bb 100644 (file)
@@ -190,7 +190,7 @@ extern "C" {
       unsigned char program_path[found->used + 1];
       program_path[found->used] = 0;
 
-      memcpy(&program_path, found->string, found->used);
+      memcpy(&program_path, found->string, sizeof(unsigned char) * found->used);
 
       f_string_dynamics_resize(0, &paths);
 
@@ -382,7 +382,7 @@ extern "C" {
       unsigned char program_path[found->used + 1];
       program_path[found->used] = 0;
 
-      memcpy(&program_path, found->string, found->used);
+      memcpy(&program_path, found->string, sizeof(unsigned char) * found->used);
 
       program_name.string = program_path;
       program_name.used = found->used;
index 8235e1f70639e44d6ebee3e41681bfe2e4bcf6ad..0295136ca880cf277f67731332e9f3de896e5619 100644 (file)
@@ -565,10 +565,10 @@ extern "C" {
 #if !defined(_di_fll_execute_program_)
   void private_fll_execute_path_arguments_fixate(const f_string_static_t program_path, const f_string_statics_t arguments, const f_string_t last_slash, const bool fixated_is, f_string_static_t program_name, f_string_t fixed_arguments[]) {
 
-    memset(program_name.string, 0, program_name.used + 1);
+    memset(program_name.string, 0, sizeof(unsigned char) * (program_name.used + 1));
     memset(fixed_arguments, 0, sizeof(f_string_t) * (arguments.used + 2));
 
-    memcpy(program_name.string, last_slash ? last_slash + 1 : program_path.string, program_name.used);
+    memcpy(program_name.string, last_slash ? last_slash + 1 : program_path.string, sizeof(unsigned char) * program_name.used);
 
     if (program_name.used) {
       fixed_arguments[0] = program_name.string;
index 6fba9580cb62e5684a4fd619153e6453ae4e6b3d..598adfcd02705db261e3c6459d742bbcb17767f2 100644 (file)
@@ -53,8 +53,8 @@ extern "C" {
           unsigned char path_sub_string[path_sub.used + 1];
           path_sub.string = path_sub_string;
 
-          memcpy(path_sub.string, path.string, path.used);
-          memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, list[i]->array[j].used);
+          memcpy(path_sub.string, path.string, sizeof(unsigned char) * path.used);
+          memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, sizeof(unsigned char) * list[i]->array[j].used);
 
           path_sub.string[path.used] = f_path_separator_s.string[0];
           path_sub.string[path_sub.used] = 0;
@@ -77,8 +77,8 @@ extern "C" {
       unsigned char path_sub_string[path_sub.used + 1];
       path_sub.string = path_sub_string;
 
-      memcpy(path_sub.string, path.string, path.used);
-      memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+      memcpy(path_sub.string, path.string, sizeof(unsigned char) * path.used);
+      memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
 
       path_sub.string[path.used] = f_path_separator_s.string[0];
       path_sub.string[path_sub.used] = 0;
@@ -155,8 +155,8 @@ extern "C" {
           unsigned char path_sub_string[path_sub.used + 1];
           path_sub.string = path_sub_string;
 
-          memcpy(path_sub.string, path.string, path.used);
-          memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, list[i]->array[j].used);
+          memcpy(path_sub.string, path.string, sizeof(unsigned char) * path.used);
+          memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, sizeof(unsigned char) * list[i]->array[j].used);
 
           path_sub.string[path.used] = f_path_separator_s.string[0];
           path_sub.string[path_sub.used] = 0;
@@ -178,8 +178,8 @@ extern "C" {
         unsigned char path_sub_string[path_sub.used + 1];
         path_sub.string = path_sub_string;
 
-        memcpy(path_sub.string, path.string, path.used);
-        memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+        memcpy(path_sub.string, path.string, sizeof(unsigned char) * path.used);
+        memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
 
         path_sub.string[path.used] = f_path_separator_s.string[0];
         path_sub.string[path_sub.used] = 0;
index 36569575cd4a3e4bcf8ae09fb431f1e278eb9302..3f695bce2eb1f169e2e74fb84aee3285c0941f25 100644 (file)
@@ -209,11 +209,11 @@ extern "C" {
             }
           }
 
-          memcpy(destination->string + destination->used + i, content.string + i, F_fss_default_block_size_normal_d);
+          memcpy(destination->string + destination->used + i, content.string + i, sizeof(unsigned char) * F_fss_default_block_size_normal_d);
         } // for
 
         if (i < content.used) {
-          memcpy(destination->string + destination->used + i, content.string + i, content.used - i);
+          memcpy(destination->string + destination->used + i, content.string + i, sizeof(unsigned char) * (content.used - i));
         }
 
         destination->used += content.used;
index d7fb7bfe263f178c52e74bb1f1f7f84b47d79b0d..f362fc86ea133caff1a8ff1adec2329fa2db9634 100644 (file)
@@ -38,7 +38,7 @@ extern "C" {
     unsigned char buffer[controller_control_default_socket_buffer_d + 1];
     size_t length = 0;
 
-    memset(buffer, 0, controller_control_default_socket_buffer_d + 1);
+    memset(buffer, 0, sizeof(unsigned char) * (controller_control_default_socket_buffer_d + 1));
 
     // Pre-process the packet header.
     control->client.size_read = controller_control_default_socket_header_d;
index 2f1667be246fd65c9d601d2755a7131788565353..631d05e49ce70629732b68ec2d3cddee28bf4df9 100644 (file)
@@ -78,13 +78,13 @@ extern "C" {
     path.string = path_string;
 
     if (global.setting->path_setting.used) {
-      memcpy(path_string, global.setting->path_setting.string, global.setting->path_setting.used);
-      memcpy(path_string + global.setting->path_setting.used + F_path_separator_s_length, cache->action.name_file.string, cache->action.name_file.used);
+      memcpy(path_string, global.setting->path_setting.string, sizeof(unsigned char) * global.setting->path_setting.used);
+      memcpy(path_string + global.setting->path_setting.used + F_path_separator_s_length, cache->action.name_file.string, sizeof(unsigned char) * cache->action.name_file.used);
 
       path_string[global.setting->path_setting.used] = f_path_separator_s.string[0];
     }
     else {
-      memcpy(path_string, cache->action.name_file.string, cache->action.name_file.used);
+      memcpy(path_string, cache->action.name_file.string, sizeof(unsigned char) * cache->action.name_file.used);
     }
 
     path_string[path.used] = 0;
@@ -371,8 +371,8 @@ extern "C" {
           unsigned char temporary[--length];
           temporary[length] = 0;
 
-          memcpy(temporary, destination->string + setting->path_current.used + 1, length);
-          memcpy(destination->string, temporary, length);
+          memcpy(temporary, destination->string + setting->path_current.used + 1, sizeof(unsigned char) * length);
+          memcpy(destination->string, temporary, sizeof(unsigned char) * length);
 
           destination->string[length] = 0;
           destination->used = length;
index 82c8f411044a044394b2256cad7db633589b13ac..8dbc021538b3397f7f6ff78cce870b2c4549c6a6 100644 (file)
@@ -1195,8 +1195,8 @@ extern "C" {
           unsigned char id_rule_name[id_rule_length + 1];
           const f_string_static_t alias_rule = macro_f_string_static_t_initialize2(id_rule_name, id_rule_length);
 
-          memcpy(id_rule_name, entry_action->parameters.array[0].string, entry_action->parameters.array[0].used);
-          memcpy(id_rule_name + entry_action->parameters.array[0].used + 1, entry_action->parameters.array[1].string, entry_action->parameters.array[1].used);
+          memcpy(id_rule_name, entry_action->parameters.array[0].string, sizeof(unsigned char) * entry_action->parameters.array[0].used);
+          memcpy(id_rule_name + entry_action->parameters.array[0].used + 1, entry_action->parameters.array[1].string, sizeof(unsigned char) * entry_action->parameters.array[1].used);
 
           id_rule_name[entry_action->parameters.array[0].used] = f_path_separator_s.string[0];
           id_rule_name[id_rule_length] = 0;
@@ -1255,9 +1255,9 @@ extern "C" {
             unsigned char cache_name_item[cache_name_item_used];
             unsigned char cache_name_file[cache_name_file_used];
 
-            memcpy(cache_name_action, cache->action.name_action.string, cache->action.name_action.used);
-            memcpy(cache_name_item, cache->action.name_item.string, cache->action.name_item.used);
-            memcpy(cache_name_file, cache->action.name_file.string, cache->action.name_file.used);
+            memcpy(cache_name_action, cache->action.name_action.string, sizeof(unsigned char) * cache->action.name_action.used);
+            memcpy(cache_name_item, cache->action.name_item.string, sizeof(unsigned char) * cache->action.name_item.used);
+            memcpy(cache_name_file, cache->action.name_file.string, sizeof(unsigned char) * cache->action.name_file.used);
 
             status_lock = controller_lock_write(is_entry, global->thread, &global->thread->lock.rule);
 
@@ -1266,9 +1266,9 @@ extern "C" {
             }
 
             // Restore cache.
-            memcpy(cache->action.name_action.string, cache_name_action, cache_name_action_used);
-            memcpy(cache->action.name_item.string, cache_name_item, cache_name_item_used);
-            memcpy(cache->action.name_file.string, cache_name_file, cache_name_file_used);
+            memcpy(cache->action.name_action.string, cache_name_action, sizeof(unsigned char) * cache_name_action_used);
+            memcpy(cache->action.name_item.string, cache_name_item, sizeof(unsigned char) * cache_name_item_used);
+            memcpy(cache->action.name_file.string, cache_name_file, sizeof(unsigned char) * cache_name_file_used);
 
             cache->action.name_action.string[cache_name_action_used] = 0;
             cache->action.name_item.string[cache_name_item_used] = 0;
index 6ad3ddf70c0d4ea0ce062ccd00402d6ab40f9989..13f4ce14fcfe0491cef04c460ab9f70fad5ccc55 100644 (file)
@@ -2061,7 +2061,7 @@ extern "C" {
 
         unsigned char buffer_string[buffer.used + 1];
 
-        memcpy(buffer_string, source.string + content.start, buffer.used);
+        memcpy(buffer_string, source.string + content.start, sizeof(unsigned char) * buffer.used);
         buffer_string[buffer.used] = 0;
         buffer.string = buffer_string;
         process->cache.action.generic.used = 0;
@@ -2246,8 +2246,8 @@ extern "C" {
           unsigned char buffer_string[buffer.used];
           buffer.string = buffer_string;
 
-          memcpy(buffer_string, options[i].string, options[i].used);
-          memcpy(buffer_string + options[i].used, controller_parameter_map_option_s.string, controller_parameter_map_option_s.used);
+          memcpy(buffer_string, options[i].string, sizeof(unsigned char) * options[i].used);
+          memcpy(buffer_string + options[i].used, controller_parameter_map_option_s.string, sizeof(unsigned char) * controller_parameter_map_option_s.used);
 
           if (fl_string_dynamic_partial_compare_string(buffer.string, source, buffer.used, content) == F_equal_to) {
             if (values[i] && parameters->array[codes[i]].result == f_console_result_additional_e || !values[i] && parameters->array[codes[i]].result == f_console_result_found_e) {
@@ -2272,8 +2272,8 @@ extern "C" {
           unsigned char buffer_string[buffer.used];
           buffer.string = buffer_string;
 
-          memcpy(buffer_string, options[i].string, options[i].used);
-          memcpy(buffer_string + options[i].used, controller_parameter_map_value_s.string, controller_parameter_map_value_s.used);
+          memcpy(buffer_string, options[i].string, sizeof(unsigned char) * options[i].used);
+          memcpy(buffer_string + options[i].used, controller_parameter_map_value_s.string, sizeof(unsigned char) * controller_parameter_map_value_s.used);
 
           if (fl_string_dynamic_partial_compare_string(buffer.string, source, buffer.used, content) == F_equal_to) {
             if (parameters->array[codes[i]].result == f_console_result_additional_e) {
@@ -2884,7 +2884,7 @@ extern "C" {
             unsigned char alias_other_buffer_string[alias_other_buffer.used + 1];
             alias_other_buffer.string = alias_other_buffer_string;
 
-            memcpy(alias_other_buffer_string, global.setting->rules.array[id_rule].alias.string, alias_other_buffer.used);
+            memcpy(alias_other_buffer_string, global.setting->rules.array[id_rule].alias.string, sizeof(unsigned char) * alias_other_buffer.used);
             alias_other_buffer_string[alias_other_buffer.used] = 0;
 
             f_thread_unlock(&global.thread->lock.rule);
@@ -4007,7 +4007,7 @@ extern "C" {
     unsigned char name_item[length_name_item];
     name_item[length_name_item] = 0;
 
-    memcpy(name_item, cache->action.name_item.string, length_name_item);
+    memcpy(name_item, cache->action.name_item.string, sizeof(unsigned char) * length_name_item);
 
     for (; i < cache->content_actions.used; ++i, type = 0) {
 
@@ -5700,7 +5700,7 @@ extern "C" {
     } // for
 
     // Restore the current name item and line number, which there should already be enough allocated space for.
-    memcpy(cache->action.name_item.string, name_item, length_name_item);
+    memcpy(cache->action.name_item.string, name_item, sizeof(unsigned char) * length_name_item);
 
     cache->action.name_item.string[length_name_item] = 0;
     cache->action.name_item.used = length_name_item;
index 3e10c579f47ebb0c88db8c80545d0b3d09a10c4a..d4ec735580485846b5793930056f9d660ff35c45 100644 (file)
@@ -114,21 +114,21 @@ extern "C" {
 
       for (; i < strings_length; ++i) {
 
-        memcpy(strings[i]->string, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used);
+        memcpy(strings[i]->string, fake_build_parameter_library_name_prefix_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_prefix_s.used);
 
         strings[i]->used += fake_build_parameter_library_name_prefix_s.used;
       } // for
 
       for (i = 0; i < strings_length; ++i) {
 
-        memcpy(strings[i]->string + strings[i]->used, data_build->setting.build_name.string, data_build->setting.build_name.used);
+        memcpy(strings[i]->string + strings[i]->used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
 
         strings[i]->used += data_build->setting.build_name.used;
       } // for
 
       for (i = 0; i < strings_length; ++i) {
 
-        memcpy(strings[i]->string + strings[i]->used, fake_build_parameter_library_name_suffix_shared_s.string, fake_build_parameter_library_name_suffix_shared_s.used);
+        memcpy(strings[i]->string + strings[i]->used, fake_build_parameter_library_name_suffix_shared_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_suffix_shared_s.used);
 
         strings[i]->used += fake_build_parameter_library_name_suffix_shared_s.used;
       } // for
@@ -137,7 +137,7 @@ extern "C" {
         if (data_build->setting.version_major_prefix.used) {
           for (i = 1; i < strings_length; ++i) {
 
-            memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major_prefix.string, data_build->setting.version_major_prefix.used);
+            memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major_prefix.string, sizeof(unsigned char) * data_build->setting.version_major_prefix.used);
 
             strings[i]->used += data_build->setting.version_major_prefix.used;
           } // for
@@ -145,7 +145,7 @@ extern "C" {
 
         for (i = 1; i < strings_length; ++i) {
 
-          memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major.string, data_build->setting.version_major.used);
+          memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major.string, sizeof(unsigned char) * data_build->setting.version_major.used);
 
           strings[i]->used += data_build->setting.version_major.used;
         } // for
@@ -154,7 +154,7 @@ extern "C" {
           if (data_build->setting.version_minor_prefix.used) {
             for (i = 2; i < strings_length; ++i) {
 
-              memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor_prefix.string, data_build->setting.version_minor_prefix.used);
+              memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor_prefix.string, sizeof(unsigned char) * data_build->setting.version_minor_prefix.used);
 
               strings[i]->used += data_build->setting.version_minor_prefix.used;
             } // for
@@ -162,7 +162,7 @@ extern "C" {
 
           for (i = 2; i < strings_length; ++i) {
 
-            memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor.string, data_build->setting.version_minor.used);
+            memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor.string, sizeof(unsigned char) * data_build->setting.version_minor.used);
 
             strings[i]->used += data_build->setting.version_minor.used;
           } // for
@@ -171,7 +171,7 @@ extern "C" {
             if (data_build->setting.version_micro_prefix.used) {
               for (i = 3; i < strings_length; ++i) {
 
-                memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro_prefix.string, data_build->setting.version_micro_prefix.used);
+                memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro_prefix.string, sizeof(unsigned char) * data_build->setting.version_micro_prefix.used);
 
                 strings[i]->used += data_build->setting.version_micro_prefix.used;
               } // for
@@ -179,7 +179,7 @@ extern "C" {
 
             for (i = 3; i < strings_length; ++i) {
 
-              memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro.string, data_build->setting.version_micro.used);
+              memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro.string, sizeof(unsigned char) * data_build->setting.version_micro.used);
 
               strings[i]->used += data_build->setting.version_micro.used;
             } // for
@@ -188,7 +188,7 @@ extern "C" {
               if (data_build->setting.version_nano_prefix.used) {
                 for (i = 4; i < strings_length; ++i) {
 
-                  memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano_prefix.string, data_build->setting.version_nano_prefix.used);
+                  memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano_prefix.string, sizeof(unsigned char) * data_build->setting.version_nano_prefix.used);
 
                   strings[i]->used += data_build->setting.version_nano_prefix.used;
                 } // for
@@ -196,7 +196,7 @@ extern "C" {
 
               for (i = 4; i < strings_length; ++i) {
 
-                memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano.string, data_build->setting.version_nano.used);
+                memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano.string, sizeof(unsigned char) * data_build->setting.version_nano.used);
 
                 strings[i]->used += data_build->setting.version_nano.used;
               } // for
@@ -254,33 +254,33 @@ extern "C" {
       parameter_file_path_string[parameter_file_path.used] = 0;
       parameter_linker_string[parameter_linker.used] = 0;
 
-      memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
-      memcpy(parameter_linker_string, fake_build_parameter_library_shared_prefix_s.string, fake_build_parameter_library_shared_prefix_s.used);
+      memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
+      memcpy(parameter_linker_string, fake_build_parameter_library_shared_prefix_s.string, sizeof(unsigned char) * fake_build_parameter_library_shared_prefix_s.used);
 
       if (data_build->setting.version_file == fake_build_version_type_major_e) {
-        memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_major_string, parameter_file_name_major.used);
+        memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_major_string, sizeof(unsigned char) * parameter_file_name_major.used);
       }
       else if (data_build->setting.version_file == fake_build_version_type_minor_e) {
-        memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_minor_string, parameter_file_name_minor.used);
+        memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_minor_string, sizeof(unsigned char) * parameter_file_name_minor.used);
       }
       else if (data_build->setting.version_file == fake_build_version_type_micro_e) {
-        memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_micro_string, parameter_file_name_micro.used);
+        memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_micro_string, sizeof(unsigned char) * parameter_file_name_micro.used);
       }
       else if (data_build->setting.version_file == fake_build_version_type_nano_e) {
-        memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_nano_string, parameter_file_name_nano.used);
+        memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_nano_string, sizeof(unsigned char) * parameter_file_name_nano.used);
       }
 
       if (data_build->setting.version_target == fake_build_version_type_major_e) {
-        memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_major_string, parameter_file_name_major.used);
+        memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_major_string, sizeof(unsigned char) * parameter_file_name_major.used);
       }
       else if (data_build->setting.version_target == fake_build_version_type_minor_e) {
-        memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_minor_string, parameter_file_name_minor.used);
+        memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_minor_string, sizeof(unsigned char) * parameter_file_name_minor.used);
       }
       else if (data_build->setting.version_target == fake_build_version_type_micro_e) {
-        memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_micro_string, parameter_file_name_micro.used);
+        memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_micro_string, sizeof(unsigned char) * parameter_file_name_micro.used);
       }
       else if (data_build->setting.version_target == fake_build_version_type_nano_e) {
-        memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_nano_string, parameter_file_name_nano.used);
+        memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_nano_string, sizeof(unsigned char) * parameter_file_name_nano.used);
       }
 
       const f_string_static_t values[] = {
@@ -326,8 +326,8 @@ extern "C" {
       parameter_file_path.string = parameter_file_path_string;
       parameter_file_path_string[parameter_file_path.used] = 0;
 
-      memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
-      memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name.string, parameter_file_name.used);
+      memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
+      memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name.string, sizeof(unsigned char) * parameter_file_name.used);
 
       *status = f_file_link(parameter_file_name_major, parameter_file_path);
 
@@ -357,8 +357,8 @@ extern "C" {
         parameter_file_path.string = parameter_file_path_string;
         parameter_file_path_string[parameter_file_path.used] = 0;
 
-        memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
-        memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_major.string, parameter_file_name_major.used);
+        memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
+        memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_major.string, sizeof(unsigned char) * parameter_file_name_major.used);
 
         *status = f_file_link(parameter_file_name_minor, parameter_file_path);
 
@@ -386,8 +386,8 @@ extern "C" {
           parameter_file_path.string = parameter_file_path_string;
           parameter_file_path_string[parameter_file_path.used] = 0;
 
-          memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
-          memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_minor.string, parameter_file_name_minor.used);
+          memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
+          memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_minor.string, sizeof(unsigned char) * parameter_file_name_minor.used);
 
           *status = f_file_link(parameter_file_name_micro, parameter_file_path);
 
@@ -414,8 +414,8 @@ extern "C" {
           parameter_file_path.string = parameter_file_path_string;
           parameter_file_path_string[parameter_file_path.used] = 0;
 
-          memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
-          memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_micro.string, parameter_file_name_micro.used);
+          memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
+          memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_micro.string, sizeof(unsigned char) * parameter_file_name_micro.used);
 
           *status = f_file_link(parameter_file_name_nano, parameter_file_path);
 
@@ -477,16 +477,16 @@ extern "C" {
       destination_string[destination.used] = 0;
       destination.used = 0;
 
-      memcpy(destination_string, main->path_build_libraries_static.string, main->path_build_libraries_static.used);
+      memcpy(destination_string, main->path_build_libraries_static.string, sizeof(unsigned char) * main->path_build_libraries_static.used);
       destination.used += main->path_build_libraries_static.used;
 
-      memcpy(destination_string + destination.used, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used);
+      memcpy(destination_string + destination.used, fake_build_parameter_library_name_prefix_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_prefix_s.used);
       destination.used += fake_build_parameter_library_name_prefix_s.used;
 
-      memcpy(destination_string + destination.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
+      memcpy(destination_string + destination.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
       destination.used += data_build->setting.build_name.used;
 
-      memcpy(destination_string + destination.used, fake_build_parameter_library_name_suffix_static_s.string, fake_build_parameter_library_name_suffix_static_s.used);
+      memcpy(destination_string + destination.used, fake_build_parameter_library_name_suffix_static_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_suffix_static_s.used);
       destination.used += fake_build_parameter_library_name_suffix_static_s.used;
 
       *status = fll_execute_arguments_add(destination, &arguments);
@@ -551,14 +551,14 @@ extern "C" {
           source_string[source.used] = 0;
 
           if (source_path.used) {
-            memcpy(source_string, source_path.string, source_path.used);
-            memcpy(source_string + source_path.used, file_name.string, file_name.used);
-            memcpy(source_string + source_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
+            memcpy(source_string, source_path.string, sizeof(unsigned char) * source_path.used);
+            memcpy(source_string + source_path.used, file_name.string, sizeof(unsigned char) * file_name.used);
+            memcpy(source_string + source_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
           }
           else {
-            memcpy(source_string, main->path_build_objects.string, main->path_build_objects.used);
-            memcpy(source_string + main->path_build_objects.used, file_name.string, file_name.used);
-            memcpy(source_string + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
+            memcpy(source_string, main->path_build_objects.string, sizeof(unsigned char) * main->path_build_objects.used);
+            memcpy(source_string + main->path_build_objects.used, file_name.string, sizeof(unsigned char) * file_name.used);
+            memcpy(source_string + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
           }
 
           *status = fll_execute_arguments_add(source, &arguments);
index e1b29ad8631560d3bacdd32104426ccef50de009..b583528ae660f33cbf676003f5e4a299e78fc950 100644 (file)
@@ -95,8 +95,8 @@ extern "C" {
       f_fss_contents_t contents = f_fss_contents_t_initialize;
 
       if (setting_file.used) {
-        memcpy(path_file_string, main->path_data_build.string, main->path_data_build.used);
-        memcpy(path_file_string + main->path_data_build.used, setting_file.string, setting_file.used);
+        memcpy(path_file_string, main->path_data_build.string, sizeof(unsigned char) * main->path_data_build.used);
+        memcpy(path_file_string + main->path_data_build.used, setting_file.string, sizeof(unsigned char) * setting_file.used);
 
         *status = fake_file_buffer(main, path_file, &buffer);
       }
index 394e541245d8309e09073243f62e8d341d123138..5453bfc5f75abb33059433691876fbf5d5e18218 100644 (file)
@@ -51,9 +51,9 @@ extern "C" {
       parameter_file_name_path.string = parameter_file_name_path_string;
       parameter_file_name_path_string[parameter_file_name_path.used] = 0;
 
-      memcpy(parameter_file_name_path_string, main->path_build_objects_shared.string, main->path_build_objects_shared.used);
-      memcpy(parameter_file_name_path_string + main->path_build_objects_shared.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
-      memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
+      memcpy(parameter_file_name_path_string, main->path_build_objects_shared.string, sizeof(unsigned char) * main->path_build_objects_shared.used);
+      memcpy(parameter_file_name_path_string + main->path_build_objects_shared.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
+      memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
 
       const f_string_static_t values[] = {
         fake_build_parameter_object_compile_s,
@@ -122,9 +122,9 @@ extern "C" {
       parameter_file_name_path.string = parameter_file_name_path_string;
       parameter_file_name_path_string[parameter_file_name_path.used] = 0;
 
-      memcpy(parameter_file_name_path_string, main->path_build_objects_static.string, main->path_build_objects_static.used);
-      memcpy(parameter_file_name_path_string + main->path_build_objects_static.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
-      memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
+      memcpy(parameter_file_name_path_string, main->path_build_objects_static.string, sizeof(unsigned char) * main->path_build_objects_static.used);
+      memcpy(parameter_file_name_path_string + main->path_build_objects_static.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
+      memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
 
       const f_string_static_t values[] = {
         fake_build_parameter_object_compile_s,
index 6af0f27d0fdfee5736fbf1d6bdfd569364ca28c5..842257131ef84f51af347f6291312cf0a9890b71 100644 (file)
@@ -64,7 +64,7 @@ extern "C" {
 
         fake_build_path_source_string(main, data_build, &data_build->setting.path_sources, &source);
 
-        memcpy(source_string + source.used, sources[i]->array[j].string, sources[i]->array[j].used);
+        memcpy(source_string + source.used, sources[i]->array[j].string, sizeof(unsigned char) * sources[i]->array[j].used);
         source.used += sources[i]->array[j].used;
         source.string[source.used] = 0;
 
@@ -161,14 +161,14 @@ extern "C" {
         destination_string[destination.used] = 0;
 
         if (destination_path.used) {
-          memcpy(destination_string, destination_path.string, destination_path.used);
-          memcpy(destination_string + destination_path.used, file_name.string, file_name.used);
-          memcpy(destination_string + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
+          memcpy(destination_string, destination_path.string, sizeof(unsigned char) * destination_path.used);
+          memcpy(destination_string + destination_path.used, file_name.string, sizeof(unsigned char) * file_name.used);
+          memcpy(destination_string + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
         }
         else {
-          memcpy(destination_string, main->path_build_objects.string, main->path_build_objects.used);
-          memcpy(destination_string + main->path_build_objects.used, file_name.string, file_name.used);
-          memcpy(destination_string + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
+          memcpy(destination_string, main->path_build_objects.string, sizeof(unsigned char) * main->path_build_objects.used);
+          memcpy(destination_string + main->path_build_objects.used, file_name.string, sizeof(unsigned char) * file_name.used);
+          memcpy(destination_string + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
         }
 
         const f_string_static_t values[] = {
index 04088b4b2cf5b1649a10a85578d7d79fd2b89d4b..54a4f35b65afbfb40e9a6fbb1112b15775c50be0 100644 (file)
@@ -61,8 +61,8 @@ extern "C" {
       parameter_file_name_path.string = parameter_file_name_path_string;
       parameter_file_name_path_string[parameter_file_name_path.used] = 0;
 
-      memcpy(parameter_file_name_path_string, main->path_build_programs_shared.string, main->path_build_programs_shared.used);
-      memcpy(parameter_file_name_path_string + main->path_build_programs_shared.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
+      memcpy(parameter_file_name_path_string, main->path_build_programs_shared.string, sizeof(unsigned char) * main->path_build_programs_shared.used);
+      memcpy(parameter_file_name_path_string + main->path_build_programs_shared.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
 
       const f_string_static_t values[] = {
         fake_build_parameter_library_output_s,
@@ -87,8 +87,8 @@ extern "C" {
       link_project_library.string = link_project_library_string;
       link_project_library_string[link_project_library.used] = 0;
 
-      memcpy(link_project_library_string, fake_build_parameter_library_link_file_s.string, fake_build_parameter_library_link_file_s.used);
-      memcpy(link_project_library_string + fake_build_parameter_library_link_file_s.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
+      memcpy(link_project_library_string, fake_build_parameter_library_link_file_s.string, sizeof(unsigned char) * fake_build_parameter_library_link_file_s.used);
+      memcpy(link_project_library_string + fake_build_parameter_library_link_file_s.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
 
       *status = fll_execute_arguments_add(link_project_library, &arguments);
     }
@@ -158,16 +158,16 @@ extern "C" {
 
       // Only include the library if there are sources that would result in it being built.
       if (data_build->setting.build_sources_library.used) {
-        memcpy(source_library_string, main->path_build_libraries_static.string, main->path_build_libraries_static.used);
+        memcpy(source_library_string, main->path_build_libraries_static.string, sizeof(unsigned char) * main->path_build_libraries_static.used);
         source_library.used += main->path_build_libraries_static.used;
 
-        memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used);
+        memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_prefix_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_prefix_s.used);
         source_library.used += fake_build_parameter_library_name_prefix_s.used;
 
-        memcpy(source_library_string + source_library.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
+        memcpy(source_library_string + source_library.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
         source_library.used += data_build->setting.build_name.used;
 
-        memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_suffix_static_s.string, fake_build_parameter_library_name_suffix_static_s.used);
+        memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_suffix_static_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_suffix_static_s.used);
         source_library.used += fake_build_parameter_library_name_suffix_static_s.used;
       }
 
@@ -178,8 +178,8 @@ extern "C" {
       parameter_file_name_path.string = parameter_file_name_path_string;
       parameter_file_name_path_string[parameter_file_name_path.used] = 0;
 
-      memcpy(parameter_file_name_path_string, main->path_build_programs_static.string, main->path_build_programs_static.used);
-      memcpy(parameter_file_name_path_string + main->path_build_programs_static.used, data_build->setting.build_name.string, data_build->setting.build_name.used);
+      memcpy(parameter_file_name_path_string, main->path_build_programs_static.string, sizeof(unsigned char) * main->path_build_programs_static.used);
+      memcpy(parameter_file_name_path_string + main->path_build_programs_static.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
 
       const f_string_static_t values[] = {
         source_library,
index 9746224c57cd07bc45a3142ffeb68cadff39dcc8..9b3f76dcc5d72c881a87dfde15375b93769e8f16 100644 (file)
@@ -22,8 +22,8 @@ extern "C" {
     path_headers.string = path_headers_string;
 
     if (data_build->setting.path_headers.used) {
-      memcpy(path_headers_string, main->path_build_includes.string, main->path_build_includes.used);
-      memcpy(path_headers_string + main->path_build_includes.used, data_build->setting.path_headers.string, data_build->setting.path_headers.used);
+      memcpy(path_headers_string, main->path_build_includes.string, sizeof(unsigned char) * main->path_build_includes.used);
+      memcpy(path_headers_string + main->path_build_includes.used, data_build->setting.path_headers.string, sizeof(unsigned char) * data_build->setting.path_headers.used);
     }
     else {
       path_headers.used = 0;
index e631b7f6e0be1abfbd7f89f623741579f8e7d36e..645dfbd75e5360b2aa5ec7e4cb1270a045f68e9f 100644 (file)
@@ -33,13 +33,13 @@ extern "C" {
 
       unsigned char build_libraries[build_libraries_length + 1];
 
-      memcpy(build_libraries, fake_build_parameter_library_link_path_s.string, fake_build_parameter_library_link_path_s.used);
+      memcpy(build_libraries, fake_build_parameter_library_link_path_s.string, sizeof(unsigned char) * fake_build_parameter_library_link_path_s.used);
 
       if (is_shared) {
-        memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
+        memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
       }
       else {
-        memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_static.string, main->path_build_libraries_static.used);
+        memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_static.string, sizeof(unsigned char) * main->path_build_libraries_static.used);
       }
 
       build_libraries[build_libraries_length] = 0;
@@ -48,8 +48,8 @@ extern "C" {
 
       unsigned char build_includes[build_includes_length + 1];
 
-      memcpy(build_includes, fake_build_parameter_library_include_s.string, fake_build_parameter_library_include_s.used);
-      memcpy(build_includes + fake_build_parameter_library_include_s.used, main->path_build_includes.string, main->path_build_includes.used);
+      memcpy(build_includes, fake_build_parameter_library_include_s.string, sizeof(unsigned char) * fake_build_parameter_library_include_s.used);
+      memcpy(build_includes + fake_build_parameter_library_include_s.used, main->path_build_includes.string, sizeof(unsigned char) * main->path_build_includes.used);
 
       const f_string_static_t values[] = {
         macro_f_string_static_t_initialize(build_libraries, 0, build_libraries_length),
@@ -75,8 +75,8 @@ extern "C" {
         buffer.string = buffer_string;
         buffer_string[buffer.used] = 0;
 
-        memcpy(buffer_string, fake_build_parameter_library_include_s.string, fake_build_parameter_library_include_s.used);
-        memcpy(buffer_string + fake_build_parameter_library_include_s.used, main->path_work_includes.string, main->path_work_includes.used);
+        memcpy(buffer_string, fake_build_parameter_library_include_s.string, sizeof(unsigned char) * fake_build_parameter_library_include_s.used);
+        memcpy(buffer_string + fake_build_parameter_library_include_s.used, main->path_work_includes.string, sizeof(unsigned char) * main->path_work_includes.used);
 
         *status = fll_execute_arguments_add(buffer, arguments);
       }
@@ -88,8 +88,8 @@ extern "C" {
         buffer.string = buffer_string;
         buffer_string[buffer.used] = 0;
 
-        memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, fake_build_parameter_library_link_path_s.used);
-        memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_shared.string, main->path_work_libraries_shared.used);
+        memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(unsigned char) * fake_build_parameter_library_link_path_s.used);
+        memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_shared.string, sizeof(unsigned char) * main->path_work_libraries_shared.used);
 
         *status = fll_execute_arguments_add(buffer, arguments);
       }
@@ -101,8 +101,8 @@ extern "C" {
         buffer.string = buffer_string;
         buffer_string[buffer.used] = 0;
 
-        memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, fake_build_parameter_library_link_path_s.used);
-        memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_static.string, main->path_work_libraries_static.used);
+        memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(unsigned char) * fake_build_parameter_library_link_path_s.used);
+        memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_static.string, sizeof(unsigned char) * main->path_work_libraries_static.used);
 
         *status = fll_execute_arguments_add(buffer, arguments);
       }
@@ -374,7 +374,7 @@ extern "C" {
       return;
     }
 
-    memcpy(path_source.string, source.string, source.used);
+    memcpy(path_source.string, source.string, sizeof(unsigned char) * source.used);
 
     fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize;
 
@@ -561,16 +561,16 @@ extern "C" {
       argument.string = argument_string;
       argument_string[argument.used] = 0;
 
-      memcpy(argument_string, f_console_symbol_short_disable_s.string, f_console_symbol_short_disable_s.used);
+      memcpy(argument_string, f_console_symbol_short_disable_s.string, sizeof(unsigned char) * f_console_symbol_short_disable_s.used);
 
       if (main->context.mode == F_color_mode_dark_d) {
-        memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_dark_s.string, f_console_standard_short_dark_s.used);
+        memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_dark_s.string, sizeof(unsigned char) * f_console_standard_short_dark_s.used);
       }
       else if (main->context.mode == F_color_mode_light_d) {
-        memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_light_s.string, f_console_standard_short_light_s.used);
+        memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_light_s.string, sizeof(unsigned char) * f_console_standard_short_light_s.used);
       }
       else if (main->context.mode == F_color_mode_no_color_d) {
-        memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_no_color_s.string, f_console_standard_short_no_color_s.used);
+        memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_no_color_s.string, sizeof(unsigned char) * f_console_standard_short_no_color_s.used);
       }
 
       *status = fll_execute_arguments_add(argument, &arguments);
@@ -585,16 +585,16 @@ extern "C" {
       argument.string = argument_string;
       argument_string[argument.used] = 0;
 
-      memcpy(argument_string, f_console_symbol_short_disable_s.string, f_console_symbol_short_disable_s.used);
+      memcpy(argument_string, f_console_symbol_short_disable_s.string, sizeof(unsigned char) * f_console_symbol_short_disable_s.used);
 
       if (main->context.mode == f_console_verbosity_quiet_e) {
-        memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_quiet_s.string, f_console_standard_short_quiet_s.used);
+        memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_quiet_s.string, sizeof(unsigned char) * f_console_standard_short_quiet_s.used);
       }
       else if (main->context.mode == f_console_verbosity_verbose_e) {
-        memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_verbose_s.string, f_console_standard_short_verbose_s.used);
+        memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_verbose_s.string, sizeof(unsigned char) * f_console_standard_short_verbose_s.used);
       }
       else if (main->context.mode == f_console_verbosity_debug_e) {
-        memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_debug_s.string, f_console_standard_short_debug_s.used);
+        memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_debug_s.string, sizeof(unsigned char) * f_console_standard_short_debug_s.used);
       }
 
       *status = fll_execute_arguments_add(argument, &arguments);
@@ -790,8 +790,8 @@ extern "C" {
         source.string = source_string;
         source_string[source.used] = 0;
 
-        memcpy(source_string, path->string, path->used);
-        memcpy(source_string + path->used, sources[i]->array[j].string, sources[i]->array[j].used);
+        memcpy(source_string, path->string, sizeof(unsigned char) * path->used);
+        memcpy(source_string + path->used, sources[i]->array[j].string, sizeof(unsigned char) * sources[i]->array[j].used);
 
         status = fll_execute_arguments_add(source, arguments);
         if (F_status_is_error(status)) return status;
@@ -858,7 +858,7 @@ extern "C" {
 
         fake_build_path_source_string(main, &data_build, &data_build.setting.path_sources, &source);
 
-        memcpy(source_string + source.used, fake_path_part_script_s.string, fake_path_part_script_s.used);
+        memcpy(source_string + source.used, fake_path_part_script_s.string, sizeof(unsigned char) * fake_path_part_script_s.used);
         source.used += fake_path_part_script_s.used;
         source.string[source.used] = 0;
 
@@ -882,10 +882,10 @@ extern "C" {
         unsigned char path_headers_string[path_headers.used + 1];
         path_headers.string = path_headers_string;
 
-        memcpy(path_headers_string, main->path_build_includes.string, main->path_build_includes.used);
+        memcpy(path_headers_string, main->path_build_includes.string, sizeof(unsigned char) * main->path_build_includes.used);
 
         if (data_build.setting.path_headers.used) {
-          memcpy(path_headers_string + main->path_build_includes.used, data_build.setting.path_headers.string, data_build.setting.path_headers.used);
+          memcpy(path_headers_string + main->path_build_includes.used, data_build.setting.path_headers.string, sizeof(unsigned char) * data_build.setting.path_headers.used);
         }
 
         path_headers_string[path_headers.used] = 0;
@@ -929,7 +929,7 @@ extern "C" {
 
         fake_build_path_source_string(main, &data_build, &data_build.setting.path_sources, &source);
 
-        memcpy(source_string + source.used, fake_path_part_script_s.string, fake_path_part_script_s.used);
+        memcpy(source_string + source.used, fake_path_part_script_s.string, sizeof(unsigned char) * fake_path_part_script_s.used);
         source.used += fake_path_part_script_s.used;
         source.string[source.used] = 0;
 
@@ -976,27 +976,27 @@ extern "C" {
 
     source->used = 0;
 
-    memcpy(source->string, main->path_sources.string, main->path_sources.used);
+    memcpy(source->string, main->path_sources.string, sizeof(unsigned char) * main->path_sources.used);
     source->used += main->path_sources.used;
 
-    memcpy(source->string + source->used, setting_path_source->string, setting_path_source->used);
+    memcpy(source->string + source->used, setting_path_source->string, sizeof(unsigned char) * setting_path_source->used);
     source->used += setting_path_source->used;
 
     if (data_build->setting.has_path_standard) {
       if (data_build->setting.build_language == fake_build_language_type_c_e) {
-        memcpy(source->string + source->used, fake_build_language_c_s.string, fake_build_language_c_s.used);
+        memcpy(source->string + source->used, fake_build_language_c_s.string, sizeof(unsigned char) * fake_build_language_c_s.used);
         source->used += fake_build_language_c_s.used;
       }
       else if (data_build->setting.build_language == fake_build_language_type_cpp_e) {
-        memcpy(source->string + source->used, fake_build_language_cpp_s.string, fake_build_language_cpp_s.used);
+        memcpy(source->string + source->used, fake_build_language_cpp_s.string, sizeof(unsigned char) * fake_build_language_cpp_s.used);
         source->used += fake_build_language_cpp_s.used;
       }
       else if (data_build->setting.build_language == fake_build_language_type_bash_e) {
-        memcpy(source->string + source->used, fake_build_language_bash_s.string, fake_build_language_bash_s.used);
+        memcpy(source->string + source->used, fake_build_language_bash_s.string, sizeof(unsigned char) * fake_build_language_bash_s.used);
         source->used += fake_build_language_bash_s.used;
       }
 
-      memcpy(source->string + source->used, f_path_separator_s.string, f_path_separator_s.used);
+      memcpy(source->string + source->used, f_path_separator_s.string, sizeof(unsigned char) * f_path_separator_s.used);
       source->used += f_path_separator_s.used;
     }
 
@@ -1031,7 +1031,7 @@ extern "C" {
 
         fake_build_path_source_string(main, data_build, &data_build->setting.path_sources, &source);
 
-        memcpy(source_string + source.used, sources[i]->array[j].string, sources[i]->array[j].used);
+        memcpy(source_string + source.used, sources[i]->array[j].string, sizeof(unsigned char) * sources[i]->array[j].used);
         source.used += sources[i]->array[j].used;
         source.string[source.used] = 0;
 
@@ -1066,11 +1066,11 @@ extern "C" {
     fake_build_path_source_string(main, data_build, &data_build->setting.path_sources_object, &source);
 
     if (specific->used) {
-      memcpy(source_string + source.used, specific->string, specific->used);
+      memcpy(source_string + source.used, specific->string, sizeof(unsigned char) * specific->used);
       source.used += specific->used;
     }
     else {
-      memcpy(source_string + source.used, generic->string, generic->used);
+      memcpy(source_string + source.used, generic->string, sizeof(unsigned char) * generic->used);
       source.used += generic->used;
     }
 
index 8c65dd144411268ccf32427b3d0a459cedfd6ffa..4eeafc89eaab752042ac25ee0e65375e97cc83ba 100644 (file)
@@ -69,10 +69,10 @@ extern "C" {
       destination.string = destination_string;
       destination_string[destination.used] = 0;
 
-      memcpy(destination_string, arguments.array[total].string, arguments.array[total].used);
+      memcpy(destination_string, arguments.array[total].string, sizeof(unsigned char) * arguments.array[total].used);
 
       if (existing) {
-        memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, arguments.array[i].used);
+        memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, sizeof(unsigned char) * arguments.array[i].used);
         destination_string[arguments.array[total].used] = f_path_separator_s.string[0];
       }
 
@@ -1060,10 +1060,10 @@ extern "C" {
       destination.string = destination_string;
       destination_string[destination.used] = 0;
 
-      memcpy(destination_string, arguments.array[total].string, arguments.array[total].used);
+      memcpy(destination_string, arguments.array[total].string, sizeof(unsigned char) * arguments.array[total].used);
 
       if (existing) {
-        memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, arguments.array[i].used);
+        memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, sizeof(unsigned char) * arguments.array[i].used);
         destination_string[arguments.array[total].used] = f_path_separator_s.string[0];
       }
 
index fdcb0f5b39201a4285c81ccd7b056873b9ec08b9..4537b734edfe59d16e3e9d1eb5e73538453d4066 100644 (file)
@@ -86,8 +86,8 @@ extern "C" {
           path_file.string = path_file_string;
           path_file_string[path_file.used] = 0;
 
-          memcpy(path_file_string, data_make->main->path_data_build.string, data_make->main->path_data_build.used);
-          memcpy(path_file_string + data_make->main->path_data_build.used, arguments.array[0].string, arguments.array[0].used);
+          memcpy(path_file_string, data_make->main->path_data_build.string, sizeof(unsigned char) * data_make->main->path_data_build.used);
+          memcpy(path_file_string + data_make->main->path_data_build.used, arguments.array[0].string, sizeof(unsigned char) * arguments.array[0].used);
 
           f_status_t status_file = f_file_is(path_file, F_file_type_regular_d, F_false);
 
index f72364db29c35a6daba4b991412403815ed14cb2..245b2465649d44d67fcf17bb968eac28158bb435 100644 (file)
@@ -312,13 +312,13 @@ extern "C" {
 
     source->used = 0;
 
-    memcpy(source->string, main->path_sources.string, main->path_sources.used);
+    memcpy(source->string, main->path_sources.string, sizeof(unsigned char) * main->path_sources.used);
     source->used += main->path_sources.used;
 
-    memcpy(source->string, fake_default_path_sources_s.string, fake_default_path_sources_s.used);
+    memcpy(source->string, fake_default_path_sources_s.string, sizeof(unsigned char) * fake_default_path_sources_s.used);
     source->used += fake_default_path_sources_s.used;
 
-    memcpy(source->string + source->used, partial->string, partial->used);
+    memcpy(source->string + source->used, partial->string, sizeof(unsigned char) * partial->used);
     source->used += partial->used;
 
     source->string[source->used] = 0;
index a7c4e56603dd9627a4d7acad2efecf0af3c9ced9..d7d78a704838eef28fa96abafe0884c6fe00587f 100644 (file)
@@ -401,8 +401,8 @@ extern "C" {
         path_file_other.string = path_file_other_string;
         path_file_other_string[path_file_other.used] = 0;
 
-        memcpy(path_file_other_string, firewall_network_path_s.string, firewall_network_path_s.used);
-        memcpy(path_file_other_string + firewall_network_path_s.used, firewall_file_other_s.string, firewall_file_other_s.used);
+        memcpy(path_file_other_string, firewall_network_path_s.string, sizeof(unsigned char) * firewall_network_path_s.used);
+        memcpy(path_file_other_string + firewall_network_path_s.used, firewall_file_other_s.string, sizeof(unsigned char) * firewall_file_other_s.used);
 
         status = firewall_buffer_rules(main, path_file_other, F_false, &local);
 
@@ -522,8 +522,8 @@ extern "C" {
         path_file_first.string = path_file_first_string;
         path_file_first_string[path_file_first.used] = 0;
 
-        memcpy(path_file_first_string, firewall_network_path_s.string, firewall_network_path_s.used);
-        memcpy(path_file_first_string + firewall_network_path_s.used, firewall_file_first_s.string, firewall_file_first_s.used);
+        memcpy(path_file_first_string, firewall_network_path_s.string, sizeof(unsigned char) * firewall_network_path_s.used);
+        memcpy(path_file_first_string + firewall_network_path_s.used, firewall_file_first_s.string, sizeof(unsigned char) * firewall_file_first_s.used);
 
         status = firewall_buffer_rules(main, path_file_first, F_false, &local);
 
index df1d5e0a98f5b265903cfb152d051d2efb4078f2..221c046cb8cce171211d2095e0dc3a1e15288348 100644 (file)
@@ -171,7 +171,7 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
             if (F_status_is_error(status)) break;
           }
 
-          memcpy(device.string, main->devices.array[local.device].string, main->devices.array[local.device].used);
+          memcpy(device.string, main->devices.array[local.device].string, sizeof(unsigned char) * main->devices.array[local.device].used);
 
           device.used = main->devices.array[local.device].used;
         }
index e5a6b60db2a9f7527b4b1d137ecbc0e5536da477..10be9c469dab9c337d5675c24887aa339b272eef 100644 (file)
@@ -22,7 +22,7 @@ extern "C" {
 
     // Determine the linear order in which all of the three parameter values are to be applied.
     if (values_total) {
-      memset(values_order, 0, values_total);
+      memset(values_order, 0, sizeof(unsigned char) * values_total);
 
       f_array_length_t k = 0;
       f_array_length_t l = 0;
index 162ac5fb3854789b40f4d5695afa4a258e456526..61a50a6368825281dbec9de2d556c8d548fd8966 100644 (file)
@@ -311,7 +311,7 @@ extern "C" {
               break;
             }
 
-            memcpy(content.string, block.string + range.start, total);
+            memcpy(content.string, block.string + range.start, sizeof(unsigned char) * total);
 
             content.used += total;
           }
@@ -386,7 +386,7 @@ extern "C" {
             break;
           }
 
-          memcpy(content.string, block.string, block.used);
+          memcpy(content.string, block.string, sizeof(unsigned char) * block.used);
 
           content.used += block.used;
         }