packages/OS400/curlmain: remove the strncpy calls

Closes #15214
This commit is contained in:
Daniel Stenberg 2024-10-09 15:59:38 +02:00
parent 45b388fdc7
commit 8c62479a77
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -61,15 +61,13 @@ int main(int argc, char **argv)
size_t inbytesleft;
size_t outbytesleft;
char dummybuf[128];
char tocode[32];
char fromcode[32];
const char *tocode = "IBMCCSID01208"; /* Use UTF-8. */
const char *fromcode = "IBMCCSID000000000010";
ebcdic_argc = argc;
ebcdic_argv = argv;
/* Build the encoding converter. */
strncpy(tocode, "IBMCCSID01208", sizeof(tocode)); /* Use UTF-8. */
strncpy(fromcode, "IBMCCSID000000000010", sizeof(fromcode));
cd = iconv_open(tocode, fromcode);
/* Measure the arguments. */