Menu

#479 Which crashes when "/" is used in the program arguments list

Which
open
GnuWin
Binaries (396)
5
2013-04-17
2009-06-18
Tom Cassidy
No

Which.exe crashes with an unhandled exception when using "/" anywhere in the arguments list.
eg. "C:>which /"
this results in which crashing.

If I choose to debug the exception in VisualStudio2008, then it gives the message:
"Unhandled exception at 0x00401dea in which.exe: 0xC0000005: Access violation writing location 0x00000000."

Discussion

  • GnuWin

    GnuWin - 2009-06-25

    I hope the next release of which will correct this. In the meantime, it does not seem to be a bug that needs immediate attention. Which only aborts when / is the first character of a filename to be searched for. Since which searches the directories specified in the PATH environment variable, there is really no need to start with a /. When / is part of the filename to be searched for, then which works correctly.

     
  • Anonymous

    Anonymous - 2013-04-17

    As a windows user, instead of using '--help' to indicate to the program to print it's usage information, I'm used to using '/?' to achieve the same outcome. This bug causes a crash when a user is seeking help and that might deter some users from trusting it.