mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Limit the amount of derivatives in external CAS
The (arbitrary) limit is 1000. Pointed out by coverity. A bad value could lock LyX.
This commit is contained in:
parent
5c03cb340c
commit
bc7704a78e
@ -896,6 +896,10 @@ void extractDiff(MathData & ar)
|
||||
int mult = 1;
|
||||
if (extractNumber(script->up(), mult)) {
|
||||
//lyxerr << "mult: " << mult << endl;
|
||||
if (mult > 1000) {
|
||||
lyxerr << "Cannot differentiate more than 1000 times !" << endl;
|
||||
continue;
|
||||
}
|
||||
for (int i = 0; i < mult; ++i)
|
||||
diff->addDer(MathData(buf, dt + 1, st));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user