#include <sys/wait.h>
#include <string.h>
#include <limits.h>
-#ifdef HAVE_PTHREAD_H
-#include <pthread.h>
-#endif
#include "citadel.h"
#include "server.h"
#include <syslog.h>
time(&now);
clnew->next = NULL;
clnew->chat_time = now;
- strncpy(clnew->chat_room, roomname, sizeof clnew->chat_room);
+ safestrncpy(clnew->chat_room, roomname, sizeof clnew->chat_room);
clnew->chat_room[sizeof clnew->chat_room - 1] = 0;
if (username) {
- strncpy(clnew->chat_username, username,
+ safestrncpy(clnew->chat_username, username,
sizeof clnew->chat_username);
clnew->chat_username[sizeof clnew->chat_username - 1] = 0;
} else