From c2da6e2ec4fe64e664d9a3a696a86ff866dabc8a Mon Sep 17 00:00:00 2001 From: ultramage Date: Sun, 6 May 2007 13:44:35 +0000 Subject: 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 --- src/login_sql/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2