vcl/source/filter/jpeg/jpegc.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 7cc2a1e231b3882c7a5a501f65230ceca92d3b36 Author: Caolán McNamara <[email protected]> Date: Fri Feb 9 16:23:08 2018 +0000 speed up jpg fuzzing Change-Id: Iad65200d132f8fdd0e598ff5a4ee4943a9f7ac26 Reviewed-on: https://gerrit.libreoffice.org/49508 Tested-by: Jenkins <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> 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; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
