Community
Participate
Working Groups
Build Identifier: 20100917-0705 WebSocketParserD06 and WebSocketParserD01 are both having bugs in parsing LENGTH_16 & LENGTH_63. There is a line "_length = _length<<8 | b", in which b should be an unsigned byte representing size. However, here b is treated as signed byte, and the _length can be NEGATIVE as a result. The correct code should be "_length = _length<<8 | (b & 0xff)". Reproducible: Always Steps to Reproduce: 1. Run any simple websocket echo program. Remember to log the received message size in server side. 2. Send message with 128 bytes. 3. See the log message in server side. The message size is negative.
Ok. It seems my code has some problem. Close the bug.