Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Glyph out of bounds with Glyph-cache #9454

Open
JSSSSSSSSSS opened this issue Oct 10, 2023 · 3 comments
Open

Bug: Glyph out of bounds with Glyph-cache #9454

JSSSSSSSSSS opened this issue Oct 10, 2023 · 3 comments

Comments

@JSSSSSSSSSS
Copy link

When connect to win2k8 with Glyph-cache on, the glyph of notepad out of bounds. see:
42cce045-874d-4f6e-b393-a9dd6e251ed0

more information:
Application details

  • FreeRDP version :2.11.2
  • cmdline: xfreerdp /v:xx /u:xxx /p:xxx /bitmap-cache /glyph-cache -fonts
  • Output of xfreerdp /buildconfig
  • OS version connecting to (server side): win2k8

And I step through the code in libfreerdp/cache/Glyph.c and found that there is a call of SetBounds in update_process_glyph_fragments. Also gdi_SetClipRng and gdi_SetNullClipRng in function gdi_Glyph_BeginDraw and gdi_Glyph_EndDraw in libfreerdp/gdi/graphics.c. What I want to say is that when deal with Primary drawing orders , it already has a bounds field. These clip operations clear the limit of bounds from Primary drawing orders.
And I comment these "Redundant clip" calls, it works fine for me.
image
image
image
image

What is the real problem ?

@JSSSSSSSSSS
Copy link
Author

One more, when dealing with Primary drawing orders-- GlyphIndex, in the VariableBytes field, the 'USE' also has a delta Bytes.
image

Mssing dealing with delta Bytes in update_process_glyph_fragments.
image

@akallabeth
Copy link
Member

@JSSSSSSSSSS ok, looks like you already found the fix.
would be great if you could create a pull request ;)

the issue here is that you use a code path that is rarely in use (2k8 already supports at least rfx) so there are not too many testers going through this.

@JSSSSSSSSSS
Copy link
Author

ok, mark

akallabeth added a commit to akallabeth/FreeRDP that referenced this issue Oct 19, 2023
akallabeth added a commit to akallabeth/FreeRDP that referenced this issue Nov 29, 2023
mfleisz pushed a commit that referenced this issue Dec 1, 2023
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

No branches or pull requests

2 participants