Opened 7 years ago

Closed 3 months ago

#49 closed defect (migrated)

Dangling pointer in OSnl2osil

Reported by: walter Owned by:
Priority: minor Milestone:
Component: other/unknown Version:
Keywords: Cc:

Description

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());

Change History (2)

comment:1 Changed 4 years ago by JunMa

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

comment:2 Changed 3 months ago by stefan

  • Resolution set to migrated
  • Status changed from new to closed

This ticket has been migrated to GitHub and will be resolved there: https://github.com/coin-or/OS/issues/49

Note: See TracTickets for help on using tickets.