Skip to content

libvncclient: guard SetDesktopSize support#713

Open
marcofortina wants to merge 1 commit into
LibVNC:masterfrom
marcofortina:fix/guard-set-desktop-size
Open

libvncclient: guard SetDesktopSize support#713
marcofortina wants to merge 1 commit into
LibVNC:masterfrom
marcofortina:fix/guard-set-desktop-size

Conversation

@marcofortina
Copy link
Copy Markdown
Contributor

Summary

Prevent libvncclient from sending SetDesktopSize to servers that have not advertised support for that client-to-server message.

Some servers close the connection when they receive the unsupported SetDesktopSize message type. SendExtDesktopSize() now follows the existing supported-message guard pattern used by other client-to-server send helpers.

Changes

  • Make SendExtDesktopSize() return without writing when rfbSetDesktopSize is not supported by the server.
  • Mark rfbSetDesktopSize as supported when an ExtendedDesktopSize update is received, because servers that support ExtendedDesktopSize must support SetDesktopSize as well.
  • Add a small client capability regression test for the unsupported path.

Validation

cmake -S . -B build-587-patch \
  -DWITH_EXAMPLES=OFF \
  -DWITH_TESTS=ON \
  -DWITH_OPENSSL=OFF \
  -DWITH_GNUTLS=OFF \
  -DWITH_GCRYPT=OFF \
  -DWITH_SDL=OFF \
  -DWITH_GTK=OFF \
  -DWITH_QT=OFF \
  -DWITH_FFMPEG=OFF \
  -DWITH_XCB=OFF \
  -DWITH_LIBSSHTUNNEL=OFF \
  -DWITH_SYSTEMD=OFF \
  -DCMAKE_BUILD_TYPE=Debug
cmake --build build-587-patch --parallel 1
ctest --test-dir build-587-patch --output-on-failure

Result:

100% tests passed, 0 tests failed out of 6

Notes

Closes #587.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error "read (104: Connection reset by peer)" after calling SendExtDesktopSize()

2 participants