Open-source C++ implementation of the recently proposed online active set strategy
GNU Lesser General Public License v2.1
397
stars
132
forks
source link
Bug report: The Flipper's private variable nV and nC is not copied in the copy function #103
Open
clw-ponyai opened 4 years ago
When assignment a
QProblem
to replace another existing one, theFlipper
will also be copied: https://github.com/coin-or/qpOASES/blob/326a6517da899cac9766b17ebdcf328858ec6e90/src/QProblemB.cpp#L1167 But the Flipper's private variablenV
andnC
is not copied in the copy function, the old value is kept: https://github.com/coin-or/qpOASES/blob/326a6517da899cac9766b17ebdcf328858ec6e90/src/Flipper.cpp#L241 This may leads to buffer overflow. If the old_nV > new_nV, thememcpy
will overrun the buffer. https://github.com/coin-or/qpOASES/blob/326a6517da899cac9766b17ebdcf328858ec6e90/src/Flipper.cpp#L180My quick fix for this: