Fix memory corruption with UTF-8 strings over 32 bytes
This commit is contained in:
parent
6a6328a355
commit
94d439e5c3
1 changed files with 5 additions and 1 deletions
|
|
@ -17,7 +17,12 @@ static PLT_THREAD inputSendThread;
|
||||||
|
|
||||||
// Contains input stream packets
|
// Contains input stream packets
|
||||||
typedef struct _PACKET_HOLDER {
|
typedef struct _PACKET_HOLDER {
|
||||||
|
LINKED_BLOCKING_QUEUE_ENTRY entry;
|
||||||
int packetLength;
|
int packetLength;
|
||||||
|
|
||||||
|
// The union must be the last member since we abuse the NV_UNICODE_PACKET
|
||||||
|
// text field to store variable length data which gets split before being
|
||||||
|
// sent to the host.
|
||||||
union {
|
union {
|
||||||
NV_INPUT_HEADER header;
|
NV_INPUT_HEADER header;
|
||||||
NV_KEYBOARD_PACKET keyboard;
|
NV_KEYBOARD_PACKET keyboard;
|
||||||
|
|
@ -30,7 +35,6 @@ typedef struct _PACKET_HOLDER {
|
||||||
NV_HAPTICS_PACKET haptics;
|
NV_HAPTICS_PACKET haptics;
|
||||||
NV_UNICODE_PACKET unicode;
|
NV_UNICODE_PACKET unicode;
|
||||||
} packet;
|
} packet;
|
||||||
LINKED_BLOCKING_QUEUE_ENTRY entry;
|
|
||||||
} PACKET_HOLDER, *PPACKET_HOLDER;
|
} PACKET_HOLDER, *PPACKET_HOLDER;
|
||||||
|
|
||||||
// Initializes the input stream
|
// Initializes the input stream
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue