In these cases, the lower bound is not that important, but coverity insists on it.
int mult = 1;
if (extractNumber(script->up(), mult)) {
//lyxerr << "mult: " << mult << endl;
- if (mult > 1000) {
- lyxerr << "Cannot differentiate more than 1000 times !" << endl;
+ if (mult < 0 || mult > 1000) {
+ lyxerr << "Cannot differentiate less than 0 or more than 1000 times !" << endl;
continue;
}
for (int i = 0; i < mult; ++i)
parse(count, FLAG_ITEM, mode);
int cols;
// limit arbitrarily to 100 columns
- if (extractNumber(count, cols) && cols < 100) {
+ if (extractNumber(count, cols) && cols > 0 && cols < 100) {
// resize the table if necessary
size_t first = grid.index(cellrow, cellcol);
for (int i = 1; i < cols; ++i) {