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 dereference in osqp_solve? #54

Closed
phrack opened this issue Mar 26, 2018 · 1 comment
Closed

Null pointer dereference in osqp_solve? #54

phrack opened this issue Mar 26, 2018 · 1 comment

Comments

@phrack
Copy link

phrack commented Mar 26, 2018

Lines 288 and 291 dereference work if PRINTING is defined. Just a few lines later on line 302 the code checks to see if work is NULL. This either suggests work cannot be NULL or there is a null pointer deference. Since work is passed by the caller, this appears to be a possible null pointer dereference.

https://github.com/oxfordcontrol/osqp/blob/88277e9f0a2c7079002bb12356bd5e5363b42042/src/osqp.c#L288
https://github.com/oxfordcontrol/osqp/blob/88277e9f0a2c7079002bb12356bd5e5363b42042/src/osqp.c#L291
https://github.com/oxfordcontrol/osqp/blob/88277e9f0a2c7079002bb12356bd5e5363b42042/src/osqp.c#L302

@bstellato
Copy link
Collaborator

Thanks for spotting that. if (!work) was at the right place before but for some weird reason it ended up after these lines.

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