$Log$
+ Revision 607.23 2003/07/14 17:26:42 ajc
+ * strcpy() --> safestrncpy() in a few other random places
+
Revision 607.22 2003/07/14 17:12:28 ajc
* Replaced strcpy() with safestrcpy() in cmd_setp()
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
cdb_free(cdbfl);
} else {
if (floor_num == 0) {
- strcpy(flbuf->f_name, "Main Floor");
+ safestrncpy(flbuf->f_name, "Main Floor",
+ sizeof flbuf->f_name);
flbuf->f_flags = F_INUSE;
flbuf->f_ref_count = 3;
}
* we can skip the extra database fetch.
*/
if (where != NULL) {
- strcpy(CC->room.QRname, where);
+ safestrncpy(CC->room.QRname, where, sizeof CC->room.QRname);
getroom(&CC->room, where);
}
if (((CC->nologin)) && (CC->user.axlevel < 6)) {
return login_too_many_users;
} else {
- strcpy(CC->curr_user, CC->user.fullname);
+ safestrncpy(CC->curr_user, CC->user.fullname,
+ sizeof CC->curr_user);
return login_ok;
}
}
char mailboxname[ROOMNAMELEN];
uid_t uid;
- strcpy(username, newusername);
+ safestrncpy(username, newusername, sizeof username);
strproc(username);
#ifdef ENABLE_AUTOLOGIN
/* Go ahead and initialize a new user record */
memset(&usbuf, 0, sizeof(struct ctdluser));
- strcpy(usbuf.fullname, username);
+ safestrncpy(usbuf.fullname, username, sizeof usbuf.fullname);
strcpy(usbuf.password, "");
usbuf.uid = uid;
if (become_user) {
/* Now become the user we just created */
memcpy(&CC->user, &usbuf, sizeof(struct ctdluser));
- strcpy(CC->curr_user, username);
+ safestrncpy(CC->curr_user, username, sizeof CC->curr_user);
CC->logged_in = 1;
/* Check to make sure we're still who we think we are */