diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-06-12 19:50:23 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-06-13 09:51:05 +0200 |
commit | 7588fa7a534a217e3949013b7c373fbb5503d466 (patch) | |
tree | b2d6549b075a52274748f7d1bb8bb3fbacfdabb4 | |
parent | b1d18451a459e0b3d0a715fb93f8104413e804df (diff) |
Resolves: fdo#49178 CRASH when FILEOPEN particular RTF
Change-Id: Idd938980b91ec8b822a92dfd7013a20fe5b6f498
(cherry picked from commit 104badf31c8a39994cadc460561bfa01e428b67b)
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableManager.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index b4aaf3d9c179..7403b4289069 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -486,8 +486,9 @@ void DomainMapperTableManager::endOfRowAction() sal_Int16 nSum = 0; sal_uInt32 nPos = 0; + sal_uInt32 nSizeTableGrid = pTableGrid->size(); // Ignoring the i=0 case means we assume that the width of the last cell matches the table width - for (int i = m_nCell; i > 1; i--) + for (sal_uInt32 i = m_nCell; i > 1 && nSizeTableGrid >= i; i--) { nSum += (*pTableGrid.get())[pTableGrid->size() - i]; // Size of the current cell pSeparators[nPos].Position = nSum * nFullWidthRelative / nFullWidth; // Relative position |