websocketsession添加防御代码
This commit is contained in:
parent
ee4ceec3d9
commit
98af57041d
@ -191,6 +191,9 @@ namespace a8
|
||||
|
||||
void WebSocketSession::DecodeFrame(char* buf, int& offset, unsigned int buflen)
|
||||
{
|
||||
if (offset + 2 < buflen) {
|
||||
return;
|
||||
}
|
||||
char* real_buf = buf + offset;
|
||||
unsigned int ava_len = buflen - offset;
|
||||
char header = real_buf[0];
|
||||
|
Loading…
x
Reference in New Issue
Block a user