https://issues.apache.org/bugzilla/show_bug.cgi?id=57524

            Bug ID: 57524
           Summary: Opcode and other fields calculated wrong in mod_lua
                    websockets
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_lua
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 32425
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=32425&action=edit
Fix bit finagling in lua_websocket_read()

The finagling of bits in mod_lua's lua_websocket_read() seems to be a bit off.
The size of char is assumed to be 8 bits, and char is assumed to be unsigned.
When these two assumptions aren't met, bad things happen; in the worst case, I
got the wrong opcode and payload length because of sign extending.

The attached patch corrects the bit operations. As a bonus, it also comments
another (unrelated) assumption the implementation makes - something to be fixed
later.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to