fix bug in websocket library
This commit is contained in:
parent
09a26c0b1c
commit
9c3d991bed
@ -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