mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 22:06:15 +00:00
Limit the number of iterations for some tabular features in math
Try to please Coverity scan.
This commit is contained in:
parent
3f5b836aa9
commit
716e20ae1b
@ -36,4 +36,15 @@ void lyxbreaker(void const * data, const char * hint, int size)
|
||||
}
|
||||
|
||||
|
||||
template<class T>
|
||||
void CoordCache<T>::check(T const * thing, char const * hint) const
|
||||
{
|
||||
typename cache_type::const_iterator it = data_.find(thing);
|
||||
|
||||
if (it == data_.end() || it->second.pos.x == -10000)
|
||||
__coverity_panic__();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -59,11 +59,12 @@ static docstring verboseHLine(int n)
|
||||
}
|
||||
|
||||
|
||||
// read a number to be used as an iteration count (limited arbitrary to 1000)
|
||||
static int extractInt(istream & is)
|
||||
{
|
||||
int num = 1;
|
||||
is >> num;
|
||||
return (num == 0) ? 1 : num;
|
||||
return min(max(num, 1), 1000);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user