diff options
Diffstat (limited to 'src/char_sql/inter.c')
-rw-r--r-- | src/char_sql/inter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/char_sql/inter.c b/src/char_sql/inter.c index 4f856211d..00c29568b 100644 --- a/src/char_sql/inter.c +++ b/src/char_sql/inter.c @@ -643,8 +643,8 @@ int mapif_parse_WisRequest(int fd) ShowError("inter: Wis message doesn't exist.\n"); return 0; } - memcpy(name, RFIFOP(fd,28), NAME_LENGTH); //Received name may be too large and not contain \0! [Skotlex] - name[NAME_LENGTH-1]= '\0'; + + safestrncpy(name, (char*)RFIFOP(fd,28), NAME_LENGTH); //Received name may be too large and not contain \0! [Skotlex] Sql_EscapeStringLen(sql_handle, esc_name, name, strnlen(name, NAME_LENGTH)); if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `name` FROM `%s` WHERE `name`='%s'", char_db, esc_name) ) |