Kaydet (Commit) 4aac7bc9 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#11203 fuzzing timeout

Change-Id: I0feb8aa17f71a6efddc1b8b95008116b36f0a1f0
Reviewed-on: https://gerrit.libreoffice.org/67239
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 6205aad7
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <sal/config.h> #include <sal/config.h>
#include <sal/log.hxx> #include <sal/log.hxx>
#include <o3tl/safeint.hxx>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -216,7 +217,8 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputS ...@@ -216,7 +217,8 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputS
long nWidth = rContext.cinfo.output_width; long nWidth = rContext.cinfo.output_width;
long nHeight = rContext.cinfo.output_height; long nHeight = rContext.cinfo.output_height;
if (nWidth > 2000 && nHeight > 2000 && utl::ConfigManager::IsFuzzing()) long nResult = 0;
if (utl::ConfigManager::IsFuzzing() && (o3tl::checked_multiply(nWidth, nHeight, nResult) || nResult > 4000000))
return; return;
bool bGray = (rContext.cinfo.output_components == 1); bool bGray = (rContext.cinfo.output_components == 1);
......
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