summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/filter/jpeg/jpegc.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index 059ec200540e..ddb5075fd817 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -35,6 +35,7 @@ extern "C" {
#include "JpegReader.hxx"
#include "JpegWriter.hxx"
#include <memory>
+#include <unotools/configmgr.hxx>
#include <vcl/bitmapaccess.hxx>
#include <vcl/graphicfilter.hxx>
@@ -203,6 +204,9 @@ void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputStream,
long nWidth = rContext.cinfo.output_width;
long nHeight = rContext.cinfo.output_height;
+ if (nWidth > 2000 && nHeight > 2000 && utl::ConfigManager::IsFuzzing())
+ return;
+
bool bGray = (rContext.cinfo.output_components == 1);
JPEGCreateBitmapParam aCreateBitmapParam;