diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-29 16:15:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-29 16:27:00 +0300 |
commit | e9cc77486c96b0177dae130a74bafe967569033b (patch) | |
tree | c81a627c2595d10ea5304944cf40db61e8957c67 /src | |
parent | da2e7b9ec12d784ad3baf8eb824cfb0b6d642302 (diff) | |
download | hercules-e9cc77486c96b0177dae130a74bafe967569033b.tar.gz hercules-e9cc77486c96b0177dae130a74bafe967569033b.tar.bz2 hercules-e9cc77486c96b0177dae130a74bafe967569033b.tar.xz hercules-e9cc77486c96b0177dae130a74bafe967569033b.zip |
Fix buffer overflow in pet rename.
Diffstat (limited to 'src')
-rw-r--r-- | src/map/pet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/pet.c b/src/map/pet.c index 71d8d1eb3..256324d29 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -679,7 +679,7 @@ int pet_change_name_ack(struct map_session_data *sd, const char *name, int flag) aFree(newname); return 0; } - memcpy(pd->pet.name, newname, NAME_LENGTH); + safestrncpy(pd->pet.name, newname, NAME_LENGTH); aFree(newname); clif->charnameack (0,&pd->bl); pd->pet.rename_flag = 1; |