summaryrefslogtreecommitdiff
path: root/src/login_sql/login.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-20 15:38:00 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-20 15:38:00 +0000
commit1765cd3f72d20ce81c8b21115242028775a0497e (patch)
tree4bf5d17535308aa8af88b814fd8bb5a0fd51ea96 /src/login_sql/login.c
parent4c83e7a2c27293b549b88e333550178fbbf04f2b (diff)
downloadhercules-1765cd3f72d20ce81c8b21115242028775a0497e.tar.gz
hercules-1765cd3f72d20ce81c8b21115242028775a0497e.tar.bz2
hercules-1765cd3f72d20ce81c8b21115242028775a0497e.tar.xz
hercules-1765cd3f72d20ce81c8b21115242028775a0497e.zip
- @stfu now allows negative intervals to be specified, they increase manner instead.
- Added overflow fix to the login-server when sending GM accounts to char. - Increased buffer size abit in check_ip (login.c) to see if it prevents stack corruption. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5683 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/login_sql/login.c')
-rw-r--r--src/login_sql/login.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index bf4acb534..edc78d48f 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -262,7 +262,11 @@ void send_GM_accounts(int fd) {
WBUFL(buf,len) = gm_account_db[i].account_id;
WBUFB(buf,len+4) = (unsigned char)gm_account_db[i].level;
len += 5;
+ if (len >= 32000) {
+ ShowWarning("send_GM_accounts: Too many accounts! Only %d out of %d were sent.\n", i, GM_num);
+ break;
}
+ }
WBUFW(buf,2) = len;
if (fd == -1)
charif_sendallwos(-1, buf, len);