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

Fix invalid DAP responses when content has non-ASCII content #104936

Merged
merged 1 commit into from
Apr 3, 2025

Conversation

rsubtil
Copy link
Contributor

@rsubtil rsubtil commented Apr 2, 2025

Fixes #104902

When sending DAP responses, the code simultaneously used buffer size and string size for calculating how much data to send. For UTF-8 encoded data, these values can be different due to special characters. This resulted in the response being truncated, generating invalid JSON responses to clients.

@rsubtil rsubtil requested a review from a team as a code owner April 2, 2025 18:23
@rsubtil rsubtil changed the title Fix invalid DAP responses when content had non-ASCII content Fix invalid DAP responses when content has non-ASCII content Apr 2, 2025
@akien-mga akien-mga requested a review from bruvzg April 2, 2025 18:44
@Calinou Calinou added bug topic:gdscript topic:editor crash cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release labels Apr 2, 2025
@Calinou Calinou added this to the 4.5 milestone Apr 2, 2025
@Repiteo Repiteo merged commit 2ad75d4 into godotengine:master Apr 3, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Apr 3, 2025

Thanks!

@rsubtil rsubtil deleted the fix-dap_print_🐛s branch April 3, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release crash topic:editor topic:gdscript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Print Chinese character cause debug instance unexpectedly closed
4 participants