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

Example segfault with wrong param usage. #2533

Open
craftmaster1231 opened this issue Nov 5, 2024 · 0 comments
Open

Example segfault with wrong param usage. #2533

craftmaster1231 opened this issue Nov 5, 2024 · 0 comments

Comments

@craftmaster1231
Copy link

craftmaster1231 commented Nov 5, 2024

else if (arg == "-t" || arg == "--threads") { params.n_threads = std::stoi(argv[++i]); }

For example, if usage is ./main -t , there should be a check for an extra argument after -t before accessing it. If not, call usage printing function and exit.

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