summaryrefslogtreecommitdiff
path: root/src/char/int_mail.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-27 01:08:15 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-27 01:40:12 +0300
commit415860ebaeb990c0c8da27cc7aa565a137b97fe9 (patch)
tree379bc512894f445da63207d58c0956ea503a5f01 /src/char/int_mail.c
parent30ba171e28b10c5f9355cab5902fa311a234d833 (diff)
downloadhercules-415860ebaeb990c0c8da27cc7aa565a137b97fe9.tar.gz
hercules-415860ebaeb990c0c8da27cc7aa565a137b97fe9.tar.bz2
hercules-415860ebaeb990c0c8da27cc7aa565a137b97fe9.tar.xz
hercules-415860ebaeb990c0c8da27cc7aa565a137b97fe9.zip
Fix possible buffer overflows with snprintf.
Diffstat (limited to 'src/char/int_mail.c')
-rw-r--r--src/char/int_mail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/char/int_mail.c b/src/char/int_mail.c
index 1d00b0fdf..7f054eda1 100644
--- a/src/char/int_mail.c
+++ b/src/char/int_mail.c
@@ -426,7 +426,7 @@ void mapif_parse_mail_return(int fd)
safestrncpy(msg.dest_name, temp_, NAME_LENGTH);
// set reply message title
- snprintf(temp_, MAIL_TITLE_LENGTH, "RE:%s", msg.title);
+ safesnprintf(temp_, MAIL_TITLE_LENGTH, "RE:%s", msg.title);
safestrncpy(msg.title, temp_, MAIL_TITLE_LENGTH);
msg.status = MAIL_NEW;