filter/source/graphicfilter/itiff/itiff.cxx | 4 ++-- solenv/clang-format/blacklist | 23 ----------------------- vcl/inc/unx/gendata.hxx | 1 - vcl/source/app/salplug.cxx | 2 +- vcl/source/gdi/pngread.cxx | 10 ++++++++++ 5 files changed, 13 insertions(+), 27 deletions(-)
New commits: commit eb70426c1fdf021f2688f179988a8c36b673c67b Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Jan 28 21:37:21 2019 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Jan 29 09:53:54 2019 +0100 ofz#11104 for timeouts, limit decompression ratios when fuzzing Change-Id: If9efe56a40a866269a06ce944885a324495af48a Reviewed-on: https://gerrit.libreoffice.org/67036 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 8f8edd243be2..4e121351530d 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -547,8 +547,8 @@ sal_uInt8* TIFFReader::getMapData(sal_uInt32 np) bool TIFFReader::ReadMap() { - //when fuzzing with a max len set, max decompress to 2000 times that limit - static size_t nMaxAllowedDecompression = [](const char* pEnv) { size_t nRet = pEnv ? std::atoi(pEnv) : 0; return nRet * 2000; }(std::getenv("FUZZ_MAX_INPUT_LEN")); + //when fuzzing with a max len set, max decompress to 250 times that limit + static size_t nMaxAllowedDecompression = [](const char* pEnv) { size_t nRet = pEnv ? std::atoi(pEnv) : 0; return nRet * 250; }(std::getenv("FUZZ_MAX_INPUT_LEN")); size_t nTotalDataRead = 0; if ( nCompression == 1 || nCompression == 32771 ) diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index b5ac9e430596..f4bdbf8ae9bc 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -900,6 +900,10 @@ sal_uInt8 PNGReaderImpl::ImplScaleColor() void PNGReaderImpl::ImplReadIDAT() { + //when fuzzing with a max len set, max decompress to 250 times that limit + static size_t nMaxAllowedDecompression = [](const char* pEnv) { size_t nRet = pEnv ? std::atoi(pEnv) : 0; return nRet * 250; }(std::getenv("FUZZ_MAX_INPUT_LEN")); + size_t nTotalDataRead = 0; + if( mnChunkLen > 0 ) { mbIDATStarted = true; @@ -922,6 +926,12 @@ void PNGReaderImpl::ImplReadIDAT() mbStatus = false; break; } + nTotalDataRead += nRead; + if (nMaxAllowedDecompression && nTotalDataRead > nMaxAllowedDecompression) + { + mbStatus = false; + break; + } if ( nRead < nToRead ) { mpScanCurrent += nRead; // more ZStream data in the next IDAT chunk commit cb50e64a858e6791f9893699be0ec5fe4a259834 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Jan 29 08:43:17 2019 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Jan 29 09:53:49 2019 +0100 Remove some kde4 leftovers The kde4 VCL Plugin was removed with 6ca3b3648e25ae9d4d2d29a0df83349198ec3f5e, so drop some now superfluous leftovers. Change-Id: I92887b679462a6ac22c3668a24ec6a9fdee8fac1 Reviewed-on: https://gerrit.libreoffice.org/67047 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist index 259dec773128..67797171aa51 100644 --- a/solenv/clang-format/blacklist +++ b/solenv/clang-format/blacklist @@ -13085,9 +13085,6 @@ shell/qa/zip/testzipimpl.hxx shell/qa/zip/ziptest.cxx shell/source/all/xml_parser.cxx shell/source/backends/desktopbe/desktopbackend.cxx -shell/source/backends/kde4be/kde4access.cxx -shell/source/backends/kde4be/kde4access.hxx -shell/source/backends/kde4be/kde4backend.cxx shell/source/backends/localebe/localebackend.cxx shell/source/backends/localebe/localebackend.hxx shell/source/backends/localebe/localebecdef.cxx @@ -18398,26 +18395,6 @@ vcl/unx/gtk3/gtk3hudawareness.cxx vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx vcl/unx/gtk3/gtk3salprn-gtk.cxx vcl/unx/gtk3/gtkprintwrapper.hxx -vcl/unx/kde4/FPServiceInfo.hxx -vcl/unx/kde4/KDE4FilePicker.cxx -vcl/unx/kde4/KDE4FilePicker.hxx -vcl/unx/kde4/KDEData.cxx -vcl/unx/kde4/KDEData.hxx -vcl/unx/kde4/KDESalDisplay.cxx -vcl/unx/kde4/KDESalDisplay.hxx -vcl/unx/kde4/KDESalFrame.cxx -vcl/unx/kde4/KDESalFrame.hxx -vcl/unx/kde4/KDESalGraphics.cxx -vcl/unx/kde4/KDESalGraphics.hxx -vcl/unx/kde4/KDESalInstance.cxx -vcl/unx/kde4/KDESalInstance.hxx -vcl/unx/kde4/KDEXLib.cxx -vcl/unx/kde4/KDEXLib.hxx -vcl/unx/kde4/VCLKDEApplication.cxx -vcl/unx/kde4/VCLKDEApplication.hxx -vcl/unx/kde4/main.cxx -vcl/unx/kde4/tst_exclude_posted_events.hxx -vcl/unx/kde4/tst_exclude_socket_notifiers.hxx vcl/unx/x11/x11sys.cxx vcl/unx/x11/xlimits.cxx vcl/win/app/saldata.cxx diff --git a/vcl/inc/unx/gendata.hxx b/vcl/inc/unx/gendata.hxx index 12824fb8bc69..15f201931792 100644 --- a/vcl/inc/unx/gendata.hxx +++ b/vcl/inc/unx/gendata.hxx @@ -27,7 +27,6 @@ enum GenericUnixSalDataType { SAL_DATA_GTK, SAL_DATA_GTK3, - SAL_DATA_KDE4, SAL_DATA_KDE5, SAL_DATA_UNX, SAL_DATA_SVP, diff --git a/vcl/source/app/salplug.cxx b/vcl/source/app/salplug.cxx index 938780d11879..555cfe04f5d7 100644 --- a/vcl/source/app/salplug.cxx +++ b/vcl/source/app/salplug.cxx @@ -263,7 +263,7 @@ SalInstance *CreateSalInstance() #ifdef MACOSX "osx" #else - "gtk3", "gtk", "kde5", "kde4", "gen" + "gtk3", "gtk", "kde5", "gen" #endif #endif }; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits