summaryrefslogtreecommitdiff
path: root/src/login_sql/login.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-06 13:44:35 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-06 13:44:35 +0000
commitc2da6e2ec4fe64e664d9a3a696a86ff866dabc8a (patch)
tree7db43cbd252b0ed7c9cdec6f4e9d7877a95fdfab /src/login_sql/login.c
parent60e14b0a38301d0013a795c1459e5573ee7d49dc (diff)
downloadhercules-c2da6e2ec4fe64e664d9a3a696a86ff866dabc8a.tar.gz
hercules-c2da6e2ec4fe64e664d9a3a696a86ff866dabc8a.tar.bz2
hercules-c2da6e2ec4fe64e664d9a3a696a86ff866dabc8a.tar.xz
hercules-c2da6e2ec4fe64e664d9a3a696a86ff866dabc8a.zip
Added a check to login_sql against too long db-stored emails.
By the way, the length should most likely be 40+1, not 39+1 (underdimensioned)... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10492 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/login_sql/login.c')
-rw-r--r--src/login_sql/login.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index 4b3c4c4a2..5929e9748 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -809,7 +809,7 @@ int parse_fromchar(int fd)
if (sql_res) {
sql_row = mysql_fetch_row(sql_res);
connect_until_time = atol(sql_row[1]);
- strcpy(email, sql_row[0]);
+ strncpy(email, sql_row[0], 40); email[39] = 0;
mysql_free_result(sql_res);
}
WFIFOW(fd,0) = 0x2713;