summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-05-02 21:00:30 +0300
committerAndrei Karas <akaras@inbox.ru>2018-05-02 21:00:52 +0300
commit61f870f921175e0d5fadcb2c318e94e102a0f594 (patch)
tree62c154e0d8194a4c6476ae3c0cc40cbdd0fdda46
parent6e00588ebfe9441f793c304d42cf3c83463abe0c (diff)
downloadhercules-61f870f921175e0d5fadcb2c318e94e102a0f594.tar.gz
hercules-61f870f921175e0d5fadcb2c318e94e102a0f594.tar.bz2
hercules-61f870f921175e0d5fadcb2c318e94e102a0f594.tar.xz
hercules-61f870f921175e0d5fadcb2c318e94e102a0f594.zip
Fix possible wrong buffer size usage in clif.c.
-rw-r--r--src/map/clif.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 47d5a1586..451b1fb17 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -19990,9 +19990,9 @@ void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_typ
}
inner->Titlelength = (int16)strlen(msg->title) + 1;
if (open_type != RODEX_OPENTYPE_RETURN) {
- strncpy(inner->SenderName, msg->sender_name, sizeof(msg->sender_name));
+ strncpy(inner->SenderName, msg->sender_name, sizeof(inner->SenderName));
} else {
- strncpy(inner->SenderName, msg->receiver_name, sizeof(msg->receiver_name));
+ strncpy(inner->SenderName, msg->receiver_name, sizeof(inner->SenderName));
}
strncpy(inner->title, msg->title, inner->Titlelength);
size += sizeof(*inner) + inner->Titlelength;
@@ -20051,9 +20051,9 @@ void clif_rodex_send_mails_all(int fd, struct map_session_data *sd, int64 mail_i
}
inner->Titlelength = (int16)strlen(msg->title) + 1;
if (msg->opentype != RODEX_OPENTYPE_RETURN) {
- strncpy(inner->SenderName, msg->sender_name, sizeof(msg->sender_name));
+ strncpy(inner->SenderName, msg->sender_name, sizeof(inner->SenderName));
} else {
- strncpy(inner->SenderName, msg->receiver_name, sizeof(msg->receiver_name));
+ strncpy(inner->SenderName, msg->receiver_name, sizeof(inner->SenderName));
}
strncpy(inner->title, msg->title, inner->Titlelength);
size += sizeof(*inner) + inner->Titlelength;
@@ -20122,9 +20122,9 @@ void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type
}
inner->Titlelength = (int16)strlen(msg->title) + 1;
if (open_type != RODEX_OPENTYPE_RETURN) {
- strncpy(inner->SenderName, msg->sender_name, sizeof(msg->sender_name));
+ strncpy(inner->SenderName, msg->sender_name, sizeof(inner->SenderName));
} else {
- strncpy(inner->SenderName, msg->receiver_name, sizeof(msg->receiver_name));
+ strncpy(inner->SenderName, msg->receiver_name, sizeof(inner->SenderName));
}
strncpy(inner->title, msg->title, inner->Titlelength);
size += sizeof(*inner) + inner->Titlelength;