diff options
-rw-r--r-- | include/inspircd.h | 3 | ||||
-rw-r--r-- | src/configreader.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index fc0f2a04e..50dc5c73b 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -349,7 +349,8 @@ class CoreExport InspIRCd : public classbase */ time_t OLDTIME; - /** A 64k buffer used to read client lines into + /** A 64k buffer used to read socket data into + * NOTE: update ValidateNetBufferSize if you change this */ char ReadBuffer[65535]; diff --git a/src/configreader.cpp b/src/configreader.cpp index 117546f09..5ee89af23 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -375,7 +375,8 @@ bool ValidateServerName(ServerConfig* conf, const char*, const char*, ValueItem bool ValidateNetBufferSize(ServerConfig* conf, const char*, const char*, ValueItem &data) { - if ((!data.GetInteger()) || (data.GetInteger() > 65535) || (data.GetInteger() < 1024)) + // 65534 not 65535 because of null terminator + if ((!data.GetInteger()) || (data.GetInteger() > 65534) || (data.GetInteger() < 1024)) { conf->GetInstance()->Logs->Log("CONFIG",DEFAULT,"No NetBufferSize specified or size out of range, setting to default of 10240."); data.Set(10240); |