Commit 9dc9a93
Fix buffer overread in Win32Handler.getShortPathName causing null characters 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>1 parent 3778d56 commit 9dc9a93
File tree
1 file changed
+1
-1
lines changed- resources/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
0 commit comments