diff options
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 5b6c86ccb21b..c4a6bca55771 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -5884,6 +5884,11 @@ 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_UINT32 / sizeof(FIDCL); + SAL_WARN_IF(nMaxEntriesAllocatable < mnIdClusters, + "escher", "FIDCL list longer than can be allocated"); + 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) |