scr_printf("%s\n", aaa);
return;
}
- safestrncpy(room_name, room->RRname, ROOMNAMELEN);
+ strncpy(room_name, room->RRname, ROOMNAMELEN);
room_flags = room->RRflags;
room_flags2 = room->RRflags2;
from_floor = curr_floor;
if (!strncasecmp(aaa, "nhdr=yes", 8))
mret[0]->nhdr = 1;
else if (!strncasecmp(aaa, "from=", 5))
- safestrncpy(mret[0]->author, &aaa[5], SIZ);
+ strncpy(mret[0]->author, &aaa[5], SIZ);
else if (!strncasecmp(aaa, "type=", 5))
mret[0]->type = atoi(&aaa[5]);
else if (!strncasecmp(aaa, "msgn=", 5))
- safestrncpy(mret[0]->msgid, &aaa[5], SIZ);
+ strncpy(mret[0]->msgid, &aaa[5], SIZ);
else if (!strncasecmp(aaa, "subj=", 5))
- safestrncpy(mret[0]->subject, &aaa[5], SIZ);
+ strncpy(mret[0]->subject, &aaa[5], SIZ);
else if (!strncasecmp(aaa, "rfca=", 5))
- safestrncpy(mret[0]->email, &aaa[5], SIZ);
+ strncpy(mret[0]->email, &aaa[5], SIZ);
else if (!strncasecmp(aaa, "room=", 5))
- safestrncpy(mret[0]->room, &aaa[5], SIZ);
+ strncpy(mret[0]->room, &aaa[5], SIZ);
else if (!strncasecmp(aaa, "rcpt=", 5))
- safestrncpy(mret[0]->recipient, &aaa[5], SIZ);
+ strncpy(mret[0]->recipient, &aaa[5], SIZ);
else if (!strncasecmp(aaa, "wefw=", 5))
- safestrncpy(mret[0]->references, &aaa[5], SIZ);
+ strncpy(mret[0]->references, &aaa[5], SIZ);
else if (!strncasecmp(aaa, "time=", 5))
mret[0]->time = atol(&aaa[5]);
else if (!strncasecmp(aaa, "locl", 4))
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
- safestrncpy(addr.sun_path, sockpath, sizeof addr.sun_path);
+ strncpy(addr.sun_path, sockpath, sizeof addr.sun_path);
s = socket(AF_UNIX, SOCK_STREAM, 0);
if (s < 0) {
} else {
size_t i = MIN(sizeof buf - 1, strlen(c_user) + 2);
memset(buf, ' ', i);
- safestrncpy(&buf[i], c_text, sizeof buf - i);
+ strncpy(&buf[i], c_text, sizeof buf - i);
}
while (strlen(buf) < 79) {
strcat(buf, " ");
snprintf(reply_to, sizeof reply_to, "%s <%s>", message->author, message->email);
}
else {
- safestrncpy(reply_to, message->email, sizeof reply_to);
+ strncpy(reply_to, message->email, sizeof reply_to);
}
}
/* But if we can't do that, set it to a Citadel address.
*/
if (!strcmp(reply_to, NO_REPLY_TO)) {
- safestrncpy(reply_to, message->author, sizeof(reply_to));
+ strncpy(reply_to, message->author, sizeof(reply_to));
}
if (message->msgid != NULL) {
- safestrncpy(reply_inreplyto, message->msgid, sizeof reply_inreplyto);
+ strncpy(reply_inreplyto, message->msgid, sizeof reply_inreplyto);
}
if (message->references != NULL) {
if (!IsEmptyStr(message->references)) {
- safestrncpy(reply_references, message->references, sizeof reply_references);
+ strncpy(reply_references, message->references, sizeof reply_references);
}
}
if (message->subject != NULL) {
- safestrncpy(reply_subject, message->subject, sizeof reply_subject);
+ strncpy(reply_subject, message->subject, sizeof reply_subject);
if (!IsEmptyStr(message->subject)) {
if (dest) {
fprintf(dest, "Subject: %s\n", message->subject);
while ((searchptr != NULL) && (num_urls < MAXURLS)) {
searchptr = strstr(searchptr, urlprefixes[p]);
if (searchptr != NULL) {
- safestrncpy(urls[num_urls], searchptr, sizeof(urls[num_urls]));
+ strncpy(urls[num_urls], searchptr, sizeof(urls[num_urls]));
for (i = 0; i < strlen(urls[num_urls]); i++) {
ch = urls[num_urls][i];
if (ch == '>' || ch == '\"' || ch == ')' || ch == ' ' || ch == '\n') {
do {
newfloor = (-1);
- safestrncpy(floorstr, floorlist[rfloor], sizeof floorstr);
+ strncpy(floorstr, floorlist[rfloor], sizeof floorstr);
strprompt("Which floor", floorstr, 255);
for (a = 0; a < 128; ++a) {
if (!strcasecmp(floorstr, &floorlist[a][0]))
/* Fetch the name of the current room admin */
r = CtdlIPCGetRoomAide(ipc, buf);
if (r / 100 == 2) {
- safestrncpy(room_admin_name, buf, sizeof room_admin_name);
+ strncpy(room_admin_name, buf, sizeof room_admin_name);
} else {
strcpy(room_admin_name, "");
}
if (r / 100 != 2) {
scr_printf("%s\n", buf);
}
- safestrncpy(buf, uglist[found], sizeof(buf));
+ strncpy(buf, uglist[found], sizeof(buf));
/* we queue ungoto information here, because we're not really
ungotoing, we're really going to a random spot in some arbitrary
room list. */
if (r / 100 != 2) {
scr_printf("%s\n", buf);
}
- safestrncpy(buf, uglist[uglistsize - 1], sizeof(buf));
+ strncpy(buf, uglist[uglistsize - 1], sizeof(buf));
uglistsize--;
free(uglist[uglistsize]);
/* Don't queue ungoto info or we end up in a loop */
/* Name of currernt room admin */
r = CtdlIPCGetRoomAide(ipc, buf);
if (r / 100 == 2)
- safestrncpy(room_admin_name, buf, sizeof room_admin_name);
+ strncpy(room_admin_name, buf, sizeof room_admin_name);
else
strcpy(room_admin_name, "");
remove_token(reg, 0, '\n');
if (a == 2)
- safestrncpy(tmpname, buf, sizeof tmpname);
+ strncpy(tmpname, buf, sizeof tmpname);
else if (a == 3)
- safestrncpy(tmpaddr, buf, sizeof tmpaddr);
+ strncpy(tmpaddr, buf, sizeof tmpaddr);
else if (a == 4)
- safestrncpy(tmpcity, buf, sizeof tmpcity);
+ strncpy(tmpcity, buf, sizeof tmpcity);
else if (a == 5)
- safestrncpy(tmpstate, buf, sizeof tmpstate);
+ strncpy(tmpstate, buf, sizeof tmpstate);
else if (a == 6)
- safestrncpy(tmpzip, buf, sizeof tmpzip);
+ strncpy(tmpzip, buf, sizeof tmpzip);
else if (a == 7)
- safestrncpy(tmpphone, buf, sizeof tmpphone);
+ strncpy(tmpphone, buf, sizeof tmpphone);
else if (a == 9)
- safestrncpy(tmpemail, buf, sizeof tmpemail);
+ strncpy(tmpemail, buf, sizeof tmpemail);
else if (a == 10)
- safestrncpy(tmpcountry, buf, sizeof tmpcountry);
+ strncpy(tmpcountry, buf, sizeof tmpcountry);
++a;
}
}
do {
ok = 1;
- safestrncpy(holdemail, tmpemail, sizeof holdemail);
+ strncpy(holdemail, tmpemail, sizeof holdemail);
strprompt("Email address", tmpemail, 31);
r = CtdlIPCDirectoryLookup(ipc, tmpemail, buf);
if (r / 100 == 2) {
scr_printf("\nYou can't use %s as your address.\n", tmpemail);
scr_printf("It is already in use by %s @ %s.\n", diruser, dirnode);
ok = 0;
- safestrncpy(tmpemail, holdemail, sizeof tmpemail);
+ strncpy(tmpemail, holdemail, sizeof tmpemail);
}
}
} while (ok == 0);