FILE *file;
/* insert command path */
- strncpy(commandLine, path, BUFFMAXLN);
+ strlcpy(commandLine, path, BUFFMAXLN);
/* insert command arguments */
va_start(ap, path);
while((pStr=va_arg(ap, char *))!=(char *)0){
strcat(commandLine, " ");
- strncat(commandLine, pStr, BUFFMAXLN);
+ strlcat(commandLine, pStr, BUFFMAXLN);
}
va_end(ap);
int ret;
/* insert command path */
- strncpy(commandLine, path, BUFFMAXLN);
+ strlcpy(commandLine, path, BUFFMAXLN);
/* insert command arguments */
va_start(ap, path);
while((pStr=va_arg(ap, char *))!=(char *)0){
strcat(commandLine, " ");
- strncat(commandLine, pStr, BUFFMAXLN);
+ strlcat(commandLine, pStr, BUFFMAXLN);
}
va_end(ap);
char str[BUFFMAXLN];
/* make Http-cookie from pid&time */
- snprintf(str, BUFFMAXLN, "%d%d", getpid(),time(NULL));
+ snprintf(str, BUFFMAXLN, "%d%ld", getpid(),time(NULL));
md5hex(cookie, SIDMAXLN, str);
}
int found=FALSE;
/* copy string not to destroy it */
- strncpy(work, env, BUFFMAXLN);
+ strlcpy(work, env, BUFFMAXLN);
/* repeat for variables */
thisVar=nextVar=work;