Skip to content

Fix protocol desynchronization in readSetDesktopSize#2124

Merged
CendioOssman merged 1 commit into
TigerVNC:masterfrom
hyder365:fix/readSetDesktopSize-protocol-desync
Jun 30, 2026
Merged

Fix protocol desynchronization in readSetDesktopSize#2124
CendioOssman merged 1 commit into
TigerVNC:masterfrom
hyder365:fix/readSetDesktopSize-protocol-desync

Conversation

@hyder365

Copy link
Copy Markdown
Contributor

readSetDesktopSize() returned true instead of false when insufficient data was available, unlike every other message handler in SMsgReader. This caused the readMsg() state machine to reset to MSGSTATE_IDLE, leading to message boundary desynchronization — the first byte of subsequent data was consumed as a new message type rather than part of the pending SetDesktopSize message.

readSetDesktopSize() returned true instead of false when insufficient
data was available, unlike every other message handler in SMsgReader.
This caused the readMsg() state machine to reset to MSGSTATE_IDLE,
leading to message boundary desynchronization when the remaining bytes
arrived later — the first byte was consumed as a new message type
rather than part of the pending SetDesktopSize message.

@CendioOssman CendioOssman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks!

@CendioOssman CendioOssman merged commit 1894d41 into TigerVNC:master Jun 30, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants