diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-12-03 02:14:26 +0100 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-12-03 14:07:06 +0100 |
commit | 3bde660f7c0d3fca42b1a431c644cf86d2c5ade8 (patch) | |
tree | e40a41a7d1ad9b39c5f57f74e2bb74010a61a07c /cui/source/options | |
parent | 8ee17eb341aaa4285d6a1fb6cdb54214379b63ec (diff) |
Add a limit for graphic cache based on used integer type to avoid overflow
Change-Id: Ibdf2cbf3c50f6732301d894d91a1b8ea58e4e5d6
(cherry picked from commit f20043a0805c3a75eb4024ed59f45291aea93ac0)
Diffstat (limited to 'cui/source/options')
-rw-r--r-- | cui/source/options/optmemory.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx index 34f0975b78af..2faa4ea7bda4 100644 --- a/cui/source/options/optmemory.cxx +++ b/cui/source/options/optmemory.cxx @@ -57,6 +57,7 @@ #include <cuires.hrc> #include "helpid.hrc" #include <dialmgr.hxx> +#include <limits> #include <config_vclplug.h> @@ -115,6 +116,7 @@ OfaMemoryOptionsPage::OfaMemoryOptionsPage(vcl::Window* pParent, const SfxItemSe { get(m_pUndoEdit, "undo"); get(m_pNfGraphicCache, "graphiccache"); + m_pNfGraphicCache->SetMax(std::numeric_limits< long >::max() >> 20); get(m_pNfGraphicObjectCache, "objectcache"); get(m_pTfGraphicObjectTime,"objecttime"); get(m_pNfOLECache, "olecache"); |