Clp icon indicating copy to clipboard operation
Clp copied to clipboard

Fix possible buffer overflow in `ClpSimplexOther`

Open Mart-Bogdan opened this issue 2 years ago • 1 comments

I have found this as warning from GCC when was installing some packages from AUR.

There is possibility of buffer overflow, especially in this case:

sprintf(line, "Odd first line %s on file %s?", line, dataFile);

Because we are using content of array line inside template, and it can be 199 chars already.

Actually offending line was already fixed in upstrem (this repo) by using buffer of size 300, but anyway using snprintf is safer.

Mart-Bogdan avatar Oct 10 '23 21:10 Mart-Bogdan

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 10 '23 21:10 CLAassistant