coin-or / Clp

COIN-OR Linear Programming Solver
Other
392 stars 82 forks source link

Clp writebasis potential bug #277

Closed a-zakir closed 9 months ago

a-zakir commented 1 year ago

Hello, ClpSimplex::writeBasis is a call to ClpSimplexOther::writeBasis which declares an array of char with the wrong size 20 . This variable is sent to another function that expects a larger array (CoinConvertDouble (int section, int formatType, double value, *char outputValue[24])). If format=1 then CoinConvertDouble attempt to memset 24 bytes of variable number which has only 20 then the behavior of memset is undefined.

regards

jjhforrest commented 1 year ago

Thanks. Doesn't look like it can cause problems - so only corrected in master.

a-zakir commented 9 months ago

Thank you