No validation of the filename
Moderators: Hacker, petermad, Stefan2, white
No validation of the filename
If you try to copy a file with renaming in "COM1" program hangs
I can't confirm this issue. I get the same error message like Holger, and no hangs.
TC 8.52a, WinXP SP3 (COM1 is enabled and my infrared adapter is connected to it).
What happens when you copy some (existing) file to COM1 on CMD?I get an "Access denied" with that command.
Regards
Dalai
TC 8.52a, WinXP SP3 (COM1 is enabled and my infrared adapter is connected to it).
What happens when you copy some (existing) file to COM1 on CMD?
Code: Select all
copy c:\somefile COM1
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
First of all, those special names are reserved since ages:
See e.g. here.
It's a Windows feature that you can do special things with such named files,
so I doubt that you would be able to distinguish actual valid targets from fake ones,
which is also what Christian stated in the past
In any case, this has been discussed in the past.MSDN wrote:Do not use the following reserved device names for the name of a file: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed by an extension, for example, NUL.tx7.
Windows NT: CLOCK$ is also a reserved device name.
See e.g. here.
It's a Windows feature that you can do special things with such named files,
so I doubt that you would be able to distinguish actual valid targets from fake ones,
which is also what Christian stated in the past
TC plugins: PCREsearch and RegXtract
Yepp, I know.milo1012 wrote:First of all, those special names are reserved since ages:
Code: Select all
copy con: t.bat<ENTER>
echo Hello World<ENTER>
pause<CONTROL^Z><ENTER>
t<ENTER>

Regards
Holger
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Indeed it's not a bug, just a Windows misfeature. I have personally used it to copy files to LPT1 (parallel printer).
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com