summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2015-01-17 15:59:12 -0200
committershennetsind <ind@henn.et>2015-01-17 15:59:12 -0200
commit84b88781a0c39f7379ed85f74dc03c4e868a171f (patch)
tree41f0392d7d872fb038b42ddc82bde56be4582e47 /src/login
parent36fa0940d5c97457f7093d81e7d298c88dac14af (diff)
downloadhercules-84b88781a0c39f7379ed85f74dc03c4e868a171f.tar.gz
hercules-84b88781a0c39f7379ed85f74dc03c4e868a171f.tar.bz2
hercules-84b88781a0c39f7379ed85f74dc03c4e868a171f.tar.xz
hercules-84b88781a0c39f7379ed85f74dc03c4e868a171f.zip
10 Distinct fixes
Addressing out of bounds read-write. Special Thanks to 4144, Haruna! Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/login')
-rw-r--r--src/login/login.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/login.c b/src/login/login.c
index e5f565644..ec5b2bb7c 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -722,7 +722,7 @@ void login_fromchar_parse_change_pincode(int fd)
struct mmo_account acc;
if( accounts->load_num(accounts, &acc, RFIFOL(fd,2) ) ) {
- strncpy( acc.pincode, (char*)RFIFOP(fd,6), 5 );
+ safestrncpy( acc.pincode, (char*)RFIFOP(fd,6), sizeof(acc.pincode) );
acc.pincode_change = ((unsigned int)time( NULL ));
accounts->save(accounts, &acc);
}