Spotted by coverity, this avoids a blocking loop when parsing.
MathData count;
parse(count, FLAG_ITEM, mode);
int cols;
MathData count;
parse(count, FLAG_ITEM, mode);
int cols;
- if (extractNumber(count, cols)) {
+ // limit arbitrarily to 100 columns
+ if (extractNumber(count, cols) && cols < 100) {
// resize the table if necessary
size_t first = grid.index(cellrow, cellcol);
for (int i = 1; i < cols; ++i) {
// resize the table if necessary
size_t first = grid.index(cellrow, cellcol);
for (int i = 1; i < cols; ++i) {