summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/socket.c3
-rw-r--r--src/common/socket.h1
-rw-r--r--src/map/clif.c2
3 files changed, 2 insertions, 4 deletions
diff --git a/src/common/socket.c b/src/common/socket.c
index a98a8cbb1..592755d5a 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -219,8 +219,7 @@ int naddr_ = 0; // # of ip addresses
// Maximum packet size in bytes, which the client is able to handle.
// Larger packets cause a buffer overflow and stack corruption.
-// TODO: This value is based on pure observation with newer clients. Replace with the actual buffer size if we ever get our hands on it.
-size_t socket_max_client_packet = 8192;
+static size_t socket_max_client_packet = 24576;
// initial recv buffer size (this will also be the max. size)
// biggest known packet: S 0153 <len>.w <emblem data>.?B -> 24x24 256 color .bmp (0153 + len.w + 1618/1654/1756 bytes)
diff --git a/src/common/socket.h b/src/common/socket.h
index 1328d4b23..a5d519d0e 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -94,7 +94,6 @@ struct socket_data
void* session_data; // stores application-specific data related to the session
};
-extern size_t socket_max_client_packet;
// Data prototype declaration
diff --git a/src/map/clif.c b/src/map/clif.c
index 5d059180e..3e45e7edb 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -4535,7 +4535,7 @@ void clif_skillinfoblock(struct map_session_data *sd)
if( (id = sd->status.skill[i].id) != 0 )
{
// workaround for bugreport:5348
- if (len + 37 > socket_max_client_packet)
+ if (len + 37 > 8192)
break;
WFIFOW(fd,len) = id;