Kaydet (Commit) 07edde2d authored tarafından Caolán McNamara's avatar Caolán McNamara

check some bounds conditions

Change-Id: Iab2f715b37d9fae816723b84ee1116fd4aff9537
üst 1504284c
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment