Coverity: buffer_size_warning: Calling strncpy with a maximum size argument of 100 bytes on destination array pid_file of size 100 bytes might leave the destination string unterminated.
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
pid_file[0] = '\0';
snprintf(pidfile_temp, sizeof(pidfile_temp), "%s/ospfd-%d.pid", pid_file, instance );
- strncpy(pid_file, pidfile_temp, sizeof(pid_file));
+ strlcpy(pid_file, pidfile_temp, sizeof(pid_file));
}
/* Process id file create. */
pid_output (pid_file);