Environment variable loop
Moderators: white, Hacker, petermad, Stefan2
Environment variable loop
I've found nice bug...
Easiest steps to reproduce:
1. open command line and execute command: set xx=%xx%
2. start TC from this command line
3. type into command line: echo %xx%
4. press Enter and enjoy hung TC!
This example is funny, but it is real that some envvars may point to others and back, so loop may occur. I think it would be good to integrate some counter in resolving loop.
Easiest steps to reproduce:
1. open command line and execute command: set xx=%xx%
2. start TC from this command line
3. type into command line: echo %xx%
4. press Enter and enjoy hung TC!
This example is funny, but it is real that some envvars may point to others and back, so loop may occur. I think it would be good to integrate some counter in resolving loop.
- ghisler(Author)
- Site Admin
- Posts: 48232
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
No wonder that this happens when you create an infinite loop...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 48232
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I will set a timeout to the function to prevent it, e.g. to catch loops like xx -> yy -> zz -> xx too.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 48232
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact: