Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argv usage dangerous. #12

Open
AbcSxyZ opened this issue Aug 8, 2020 · 0 comments
Open

Argv usage dangerous. #12

AbcSxyZ opened this issue Aug 8, 2020 · 0 comments

Comments

@AbcSxyZ
Copy link

AbcSxyZ commented Aug 8, 2020

You're selecting filename with infile = sys.argv[-1].

In normal usage, called by BSS, it won't create any trouble. However, if image you're using it as standalone, or if something wrong occur and no argument is given, you're going to select argv[0], the script filename.

It will rewrite the export.py file.
Some condition must be added, raise en error if there isn't the right number of arguments, whatever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant