Skip to content

Commit

Permalink
Fix expected mouse event sizes
Browse files Browse the repository at this point in the history
Commit fefb981 modified mouse events
serialization. The server-side parsing was updated to correctly read the
position, but the expected size of these events was not updated.

As a result, the server might try to parse incomplete events, leading
to BufferUnderflowException.

Fixes
<#350 (comment)>.
  • Loading branch information
rom1v committed Jan 22, 2019
1 parent 7764a83 commit b35733e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
public class ControlEventReader {

private static final int KEYCODE_PAYLOAD_LENGTH = 9;
private static final int MOUSE_PAYLOAD_LENGTH = 13;
private static final int SCROLL_PAYLOAD_LENGTH = 16;
private static final int MOUSE_PAYLOAD_LENGTH = 17;
private static final int SCROLL_PAYLOAD_LENGTH = 20;
private static final int COMMAND_PAYLOAD_LENGTH = 1;

public static final int TEXT_MAX_LENGTH = 300;
Expand Down

0 comments on commit b35733e

Please sign in to comment.