Core/PacketIO: increased allowed storage size of ByteBuffer from ~10mb to ~100mb and fixed a logic mistake that was allowing first-time append calls to bypass that size limit (#30037)

(cherry picked from commit a3db80ce58)
This commit is contained in:
Ovahlord
2024-06-15 18:12:18 +02:00
parent f5bdd03ae1
commit c366275e81

View File

@@ -95,7 +95,7 @@ void ByteBuffer::append(uint8 const* src, size_t cnt)
{
ASSERT(src, "Attempted to put a NULL-pointer in ByteBuffer (pos: " SZFMTD " size: " SZFMTD ")", _wpos, size());
ASSERT(cnt, "Attempted to put a zero-sized value in ByteBuffer (pos: " SZFMTD " size: " SZFMTD ")", _wpos, size());
ASSERT(size() < 10000000);
ASSERT((size() + cnt) < 100000000);
FlushBits();