vcl/Module_vcl.mk | 1 + vcl/source/gdi/dibtools.cxx | 11 +++++++++++ 2 files changed, 12 insertions(+)
New commits: commit a5ebee938e7c77c93f22284b4a2c3a4333c8703a Author: David Tardon <dtar...@redhat.com> Date: Thu Jan 21 10:19:13 2016 +0100 Revert "disable test that suddenly eats GBs of memory" This reverts commit e1367aaf7d9cc93bbbe3ba64015fde3469c61c6e. diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index bedb0e7..299ffb1 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -100,6 +100,7 @@ $(eval $(call gb_Module_add_check_targets,vcl,\ CppunitTest_vcl_font \ CppunitTest_vcl_fontmetric \ CppunitTest_vcl_complextext \ + CppunitTest_vcl_filters_test \ CppunitTest_vcl_outdev \ CppunitTest_vcl_app_test \ CppunitTest_vcl_wmf_test \ commit 32b0e02e5b82a8a13822e115574c6b77e30127ef Author: David Tardon <dtar...@redhat.com> Date: Thu Jan 21 12:28:19 2016 +0100 at least partially sanitize image dimensions ... to avoid enormous allocations later. Change-Id: I8ffb050f095bd7ba2fee5be738bb30cd45170b82 diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 59db04c..e5b67fa 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -301,6 +301,17 @@ bool ImplReadDIBInfoHeader(SvStream& rIStm, DIBV5Header& rHeader, bool& bTopDown return false; } + if (rHeader.nCompression == 0) + { + sal_uInt64 nMaxSize = rIStm.remainingSize(); + if (rHeader.nHeight != 0) + nMaxSize /= rHeader.nHeight; + if (rHeader.nPlanes != 0) + nMaxSize /= rHeader.nPlanes; + if (sal_Int64(nMaxSize) < rHeader.nWidth) + return false; + } + return rIStm.good(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits