I do strncpy from one buff to another. On some length of source buffer in the second buffer appears additional characters at the end. Code is very simple and clear:
len=strlen(argv[2]);
param=(char*)malloc(sizeof(char*)*(len+1));
strcpy(param,argv[2])...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.