fix bug in websocket library
This commit is contained in:
parent
0fd8a9540b
commit
6ee1daeaf7
@ -495,7 +495,7 @@ public class WebSocket : NSObject, NSStreamDelegate {
|
||||
dataLength = UInt64(bytes[0].bigEndian)
|
||||
offset += sizeof(UInt16)
|
||||
}
|
||||
if bufferLen < offset {
|
||||
if bufferLen < offset || UInt64(bufferLen - offset) < dataLength {
|
||||
fragBuffer = NSData(bytes: buffer, length: bufferLen)
|
||||
return
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user