We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When assignment a QProblem to replace another existing one, the Flipper will also be copied:
QProblem
Flipper
qpOASES/src/QProblemB.cpp
Line 1167 in 326a651
nV
nC
qpOASES/src/Flipper.cpp
Line 241 in 326a651
memcpy
Line 180 in 326a651
My quick fix for this:
diff -urN a/src/Flipper.cpp b/src/Flipper.cpp --- a/src/Flipper.cpp 2017-04-03 12:20:42.000000000 +0800 +++ b/src/Flipper.cpp 2020-06-28 12:01:42.438327284 +0800 @@ -238,6 +238,8 @@ returnValue Flipper::copy( const Flipper& rhs ) { + nV = rhs.nV; + nC = rhs.nC; return set( &(rhs.bounds),rhs.R, &(rhs.constraints),rhs.Q,rhs.T ); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When assignment a
QProblem
to replace another existing one, theFlipper
will also be copied:qpOASES/src/QProblemB.cpp
Line 1167 in 326a651
But the Flipper's private variable
nV
andnC
is not copied in the copy function, the old value is kept:qpOASES/src/Flipper.cpp
Line 241 in 326a651
This may leads to buffer overflow. If the old_nV > new_nV, the
memcpy
will overrun the buffer.qpOASES/src/Flipper.cpp
Line 180 in 326a651
My quick fix for this:
The text was updated successfully, but these errors were encountered: