longcw / faster_rcnn_pytorch

Faster RCNN with PyTorch
MIT License
1.7k stars 466 forks source link

potential bug in __init__.py #106

Open Alfusainey opened 1 year ago

Alfusainey commented 1 year ago

There maybe a potential bug in init.py due to the usage of path.strip('"').

The code in the which() function is similar to the code in version 6 of this Stack Overflow answer and in version 7 of the answer (5 years later), the call to path.strip('"') was removed for the reason that "'neither WIndows nor POSIX appear to encourage quoted PATH items"

Can someone kindly verify if this may cause an issue for this project?

Additional Context

We came across this issue while investigating open-source projects to see if they contain code that is similar to (or reused from) Stack Overflow and whether the code on Stack Overflow underwent any bug or security fixes. We found that the code in the which() method is somewhat similar to the one in this answer version. The issue was subsequently fixed 5 years later in version 7, however, the fix is not reflected in this function.