projects
/
slink.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ec81122
)
Use memcpy instead of strcpy
master
author
Robert Pengelly
<robertapengelly@hotmail.com>
Sun, 11 May 2025 23:54:21 +0000
(
00:54
+0100)
committer
Robert Pengelly
<robertapengelly@hotmail.com>
Sun, 11 May 2025 23:54:21 +0000
(
00:54
+0100)
pe.c
patch
|
blob
|
history
diff --git
a/pe.c
b/pe.c
index 725adfc0d29f9e78f1a37183cfebdc0437d66b44..1cbd650da05add931ad4a9c1fda7c20a6acc0258 100644
(file)
--- a/
pe.c
+++ b/
pe.c
@@
-1162,7
+1162,7
@@
static void write_implib (struct export_name *export_names, unsigned long num_na
offset2 += write_data (outfile, §ion_descriptor_short, sizeof (section_descriptor_short));
memset (§ion_descriptor_short, 0, sizeof (section_descriptor_short));
offset2 += write_data (outfile, §ion_descriptor_short, sizeof (section_descriptor_short));
memset (§ion_descriptor_short, 0, sizeof (section_descriptor_short));
-
strcpy ((char *) section_descriptor_short.z.SectionName, ".idata$2"
);
+
memcpy ((char *) section_descriptor_short.z.SectionName, ".idata$2", 8
);
integer_to_array (0xC0000040, section_descriptor_short.b, 4);
integer_to_array (2, section_descriptor_short.c, 4);
integer_to_array (0xC0000040, section_descriptor_short.b, 4);
integer_to_array (2, section_descriptor_short.c, 4);
@@
-1171,7
+1171,7
@@
static void write_implib (struct export_name *export_names, unsigned long num_na
offset2 += write_data (outfile, §ion_descriptor_short, sizeof (section_descriptor_short));
memset (§ion_descriptor_short, 0, sizeof (section_descriptor_short));
offset2 += write_data (outfile, §ion_descriptor_short, sizeof (section_descriptor_short));
memset (§ion_descriptor_short, 0, sizeof (section_descriptor_short));
-
strcpy ((char *) section_descriptor_short.z.SectionName, ".idata$6"
);
+
memcpy ((char *) section_descriptor_short.z.SectionName, ".idata$6", 8
);
integer_to_array (0, section_descriptor_short.b, 4);
integer_to_array (3, section_descriptor_short.c, 4);
integer_to_array (0, section_descriptor_short.b, 4);
integer_to_array (3, section_descriptor_short.c, 4);
@@
-1180,7
+1180,7
@@
static void write_implib (struct export_name *export_names, unsigned long num_na
offset2 += write_data (outfile, §ion_descriptor_short, sizeof (section_descriptor_short));
memset (§ion_descriptor_short, 0, sizeof (section_descriptor_short));
offset2 += write_data (outfile, §ion_descriptor_short, sizeof (section_descriptor_short));
memset (§ion_descriptor_short, 0, sizeof (section_descriptor_short));
-
strcpy ((char *) section_descriptor_short.z.SectionName, ".idata$4"
);
+
memcpy ((char *) section_descriptor_short.z.SectionName, ".idata$4", 8
);
integer_to_array (0xC0000040, section_descriptor_short.b, 4);
integer_to_array (0, section_descriptor_short.c, 4);
integer_to_array (0xC0000040, section_descriptor_short.b, 4);
integer_to_array (0, section_descriptor_short.c, 4);
@@
-1189,7
+1189,7
@@
static void write_implib (struct export_name *export_names, unsigned long num_na
offset2 += write_data (outfile, §ion_descriptor_short, sizeof (section_descriptor_short));
memset (§ion_descriptor_short, 0, sizeof (section_descriptor_short));
offset2 += write_data (outfile, §ion_descriptor_short, sizeof (section_descriptor_short));
memset (§ion_descriptor_short, 0, sizeof (section_descriptor_short));
-
strcpy ((char *) section_descriptor_short.z.SectionName, ".idata$5"
);
+
memcpy ((char *) section_descriptor_short.z.SectionName, ".idata$5", 8
);
integer_to_array (0xC0000040, section_descriptor_short.b, 4);
integer_to_array (0, section_descriptor_short.c, 4);
integer_to_array (0xC0000040, section_descriptor_short.b, 4);
integer_to_array (0, section_descriptor_short.c, 4);