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

Dangling pointer in OSnl2osil #49

Open
svigerske opened this issue Mar 5, 2019 · 1 comment
Open

Dangling pointer in OSnl2osil #49

svigerske opened this issue Mar 5, 2019 · 1 comment

Comments

@svigerske
Copy link
Member

Issue created by migration from Trac.

Original creator: walter

Original creation time: 2011-12-29 12:35:19

Version:

In OSnl2osil's constructor has the following:

stub = &nlfilename[ 0];
nl = jac0dim(stub, (fint)strlen(stub));

Where nlfilename is passed by value and so it will be destroyed on exit from the c'tor (leaving stub dangling.)

One solution is to remove the unused member and simplify the c'tor to:

nl = jac0dim(nlfilename.c_str(), (fint)nlfilename.length());
@svigerske
Copy link
Member Author

Comment by JunMa created at 2015-03-13 17:56:34

Sorry for the late reply. Do you still encounter the same issue?

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

No branches or pull requests

1 participant