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

null pointer assignment to argv #9

Closed
kkirby opened this issue Dec 12, 2015 · 1 comment
Closed

null pointer assignment to argv #9

kkirby opened this issue Dec 12, 2015 · 1 comment

Comments

@kkirby
Copy link

kkirby commented Dec 12, 2015

When you assign this->output to argv, and then later on assign a null value to this->output[x], it also updates argv to have a null pointer. This is unexpected and argv shouldn't be modified.

@cofyc
Copy link
Owner

cofyc commented Dec 14, 2015

Hi,

At beginning, I wrote this library to simplify arguments parsing as possible as I can. Modifying original argv may have side effects (see issue #3).

It's hard to change the design now. To work around it, you can make a copy at first, then pass the copy of argv to argparse_parse.

@cofyc cofyc closed this as completed Sep 14, 2017
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

2 participants