[Libreoffice-commits] .: Branch 'libreoffice-3-5' - filter/source
Petr Mladek
pmladek at kemper.freedesktop.org
Mon Jul 2 05:39:07 PDT 2012
filter/source/msfilter/msdffimp.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 63dbfa8386159c2f22b7e3ef786f3c93fd4217aa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon May 28 16:13:09 2012 +0100
clip max entries
Signed-off-by: Petr Mladek <pmladek at suse.cz>
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 3107635..56234e2 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6049,6 +6049,9 @@ void SvxMSDffManager::GetFidclData( sal_uInt32 nOffsDggL )
"escher", "FIDCL list longer than remaining bytes, ppt or parser is wrong");
mnIdClusters = std::min(nMaxEntriesPossible, static_cast<sal_Size>(mnIdClusters));
+ sal_Size nMaxEntriesAllocatable = SAL_MAX_INT32 / sizeof(FIDCL);
+ mnIdClusters = std::min(nMaxEntriesAllocatable, static_cast<sal_Size>(mnIdClusters));
+
mpFidcls = new FIDCL[ mnIdClusters ];
memset(mpFidcls, 0, mnIdClusters * sizeof(FIDCL));
for (sal_uInt32 i = 0; i < mnIdClusters; ++i)
More information about the Libreoffice-commits
mailing list