From d0725afa8363b5f7b0612e087b48013d39339039 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 18 Jan 2015 11:37:45 -0200 Subject: Fixing 38 issues Addressing out of bounds read/write, pointless null checks on already deferenced variables, dead code. Special Thanks to 4144 and Haruna! Signed-off-by: shennetsind --- src/map/chrif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map/chrif.c') diff --git a/src/map/chrif.c b/src/map/chrif.c index a5003ab95..153216cef 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -952,14 +952,14 @@ void chrif_idbanned(int fd) { time_t timestamp; char tmpstr[2048]; timestamp = (time_t)RFIFOL(fd,7); // status or final date of a banishment - strcpy(tmpstr, msg_txt(423)); //"Your account has been banished until " + safestrncpy(tmpstr, msg_txt(423), sizeof(tmpstr)); //"Your account has been banished until " strftime(tmpstr + strlen(tmpstr), 24, "%d-%m-%Y %H:%M:%S", localtime(×tamp)); clif->message(sd->fd, tmpstr); } else if (RFIFOB(fd,6) == 2) { // 2: change of status for character time_t timestamp; char tmpstr[2048]; timestamp = (time_t)RFIFOL(fd,7); // status or final date of a banishment - strcpy(tmpstr, msg_txt(433)); //"This character has been banned until " + safestrncpy(tmpstr, msg_txt(433), sizeof(tmpstr)); //"This character has been banned until " strftime(tmpstr + strlen(tmpstr), 24, "%d-%m-%Y %H:%M:%S", localtime(×tamp)); clif->message(sd->fd, tmpstr); } -- cgit v1.2.3-60-g2f50