Skip to content

Conversation

@akurtakov
Copy link
Member

@akurtakov akurtakov merged commit e84d095 into eclipse-platform:master Jun 10, 2022
laeubi added a commit that referenced this pull request Nov 7, 2025
…racters in command lines (#26)

* Initial plan

* Fix null character in Win32Handler.getShortPathName

The issue was that GetShortPathName returns the total length of the shortened path (including prefix like \\?\), but when creating the String from the buffer with an offset, we need to use (newLength - offset) as the length parameter, not newLength. This was causing the String constructor to read past the actual data, picking up null characters from the uninitialized buffer.

Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: laeubi <1331477+laeubi@users.noreply.github.com>
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.

1 participant