summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlrowi.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-04 03:17:13 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-01-04 03:34:25 +0100
commit9bcfb6f06bf5a4708b8858469b4118af4222db5a (patch)
tree093291d5d72c9099c4fdbc5402b1ca481f7ad1e1 /sc/source/filter/xml/xmlrowi.cxx
parent3e85d9c62c69ee39dd4c6ae7cd556fdf53f5e01d (diff)
add some more safety checks for row and column import from ODS
Change-Id: Ic714c65cfe93198c462ba55752223f4e60e5aad9
Diffstat (limited to 'sc/source/filter/xml/xmlrowi.cxx')
-rw-r--r--sc/source/filter/xml/xmlrowi.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index 67d1f23ae43a..a4434e1b2a37 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -83,6 +83,7 @@ ScXMLTableRowContext::ScXMLTableRowContext( ScXMLImport& rImport,
case XML_TOK_TABLE_ROW_ATTR_REPEATED:
{
nRepeatedRows = std::max( sValue.toInt32(), (sal_Int32) 1 );
+ nRepeatedRows = std::min( nRepeatedRows, MAXROWCOUNT );
}
break;
case XML_TOK_TABLE_ROW_ATTR_DEFAULT_CELL_STYLE_NAME: