]> gitweb.michael.orlitzky.com - iconv-quirks.git/commitdiff
main.c: fix strcat -> strcpy on first use
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 5 Jul 2026 20:23:32 +0000 (16:23 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 5 Jul 2026 20:23:32 +0000 (16:23 -0400)
main.c

diff --git a/main.c b/main.c
index 1b57b3affe10f32d37e494745e480af1d7e97ecf..cb0229709ec1feea4a8ede8b4156246ac47dfe4a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -99,7 +99,7 @@ int _my_iconv_close(iconv_t* cd) {
 int test_iconv_open_supports_suffix(const char* suffix) {
   const char* fromcode = "ASCII";
   char* tocode = malloc(strlen(fromcode) + strlen(suffix) + 1);
-  strcat(tocode, fromcode);
+  strcpy(tocode, fromcode);
   strcat(tocode, suffix);
 
   char msg[59];