Skip to content

fix(session): handle bitmap updates wider than the destination rectangle - #1452

Closed
Viktor Liu (lixmal) wants to merge 1 commit into
Devolutions:masterfrom
netbirdio:fix/slow-path-bitmap-stride
Closed

fix(session): handle bitmap updates wider than the destination rectangle#1452
Viktor Liu (lixmal) wants to merge 1 commit into
Devolutions:masterfrom
netbirdio:fix/slow-path-bitmap-stride

Conversation

@lixmal

@lixmal Viktor Liu (lixmal) commented Jul 15, 2026

Copy link
Copy Markdown

Summary

  • Trim each bitmap row to the destination rectangle width before applying it, in both the compressed (RDP 6.0 / RLE) and uncompressed paths in process_bitmap_update()

Some servers, like xrdp, round the bitmap width in a Bitmap Update up to a multiple of 4, so the width can be bigger than the destination rectangle. The apply functions use the rectangle width as the row stride, so the extra padding columns push every following row over and the image comes out sheared.

Relates to

Validation

  • cargo xtask check fmt -v
  • cargo xtask check lints -v
  • Tested against XRDP 0.10.1 (Debian 13) via the web client: the login screen renders sheared on master and correct with this change.

@lixmal

Copy link
Copy Markdown
Author

Closing as a duplicate of #1436, which fixes the same padded-bitmap shear and also crops the row count, not just the width. #1252 covers the same area plus the out-of-bounds writes. Thanks!

@lixmal
Viktor Liu (lixmal) deleted the fix/slow-path-bitmap-stride branch July 15, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant