VSCode becomes unresponsive after pasting filename with many dots in file tree #116199
Labels
author-verification-requested
Issues potentially verifiable by issue author
bug
Issue identified by VS Code Team member as probable bug
freeze-slow-crash-leak
VS Code crashing, performance, freeze and memory leak issues
help wanted
Issues identified as good community contribution opportunities
insiders-released
Patch has been released in VS Code Insiders
verified
Verification succeeded
Milestone
I stumbled upon this bug by accident when I had the contents of some large file in my clipboard and (not realizing I had these file contents in the clipboard) when I pasted it in the filename of the file explorer of VSCode, it became unresponsive to the point I had to force kill it. In my opinion it is not very critical, not many people with encounter this issue, it was just surprising that my vscode became unresponsive due to this. I tried to locate the source of the issue in the code, but I couldn't find it myself.
Steps to Reproduce:
python -c "print('a.' * 50000)" | xclip -sel clip
for thisF2
, followed byCTRL-V
to paste the stringI found out that when you would paste 100.000 characters without using dots (i.e.
python -c "print('ab' * 50000)" | xclip -sel clip
), then VSCode responds very quickly and lets me know the filename is invalid.Since the maximum allowed length of a filename is 255 characters, I think it would suffice to limit the filename to 255 characters before any further parsing is done.
Does this issue occur when all extensions are disabled?: Yes /
noThe text was updated successfully, but these errors were encountered: