[prev in list] [next in list] [prev in thread] [next in thread]
List: lyx-cvs
Subject: [LyX/master] Limit multirow to 100 columns in mathed
From: Jean-Marc Lasgouttes <lasgouttes () lyx ! org>
Date: 2017-03-28 9:43:27
Message-ID: 20170328094327.E07D02800D3 () lyx ! lyx ! org
[Download RAW message or body]
commit 31cd421bcd26647cb7edbb694b05473271fe9153
Author: Jean-Marc Lasgouttes <lasgouttes@lyx.org>
Date: Tue Mar 28 11:41:27 2017 +0200
Limit multirow to 100 columns in mathed
Spotted by coverity, this avoids a blocking loop when parsing.
---
src/mathed/MathParser.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp
index ca2eb0f..ace167c 100644
--- a/src/mathed/MathParser.cpp
+++ b/src/mathed/MathParser.cpp
@@ -1374,7 +1374,8 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
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) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic