[poppler] Branch 'aacid_gitlab/no_operator_names' - 2 commits - cmake/modules poppler/JBIG2Stream.cc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Nov 14 00:27:39 UTC 2020
Rebased ref, commits from common ancestor:
commit a01a75d66ddeeb9637475cb0d4a196a1c1838588
Author: Albert Astals Cid <aacid at kde.org>
Date: Sat Nov 14 01:26:28 2020 +0100
gcc: Enable -fno-operator-names
They are valid C++ but it's not what this project uses, it's a matter of
uniformity (same reason we have clang-format for example)
diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
index 6e5f0050..0950791d 100644
--- a/cmake/modules/PopplerMacros.cmake
+++ b/cmake/modules/PopplerMacros.cmake
@@ -123,7 +123,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set(DEFAULT_COMPILE_WARNINGS_EXTRA "${_warn} ${_warnx}")
set(_save_cxxflags "${CMAKE_CXX_FLAGS}")
- set(CMAKE_CXX_FLAGS "-fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE")
+ set(CMAKE_CXX_FLAGS "-fno-exceptions -fno-check-new -fno-common -fno-operator-names -D_DEFAULT_SOURCE")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cxxflags}")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${_save_cxxflags}")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cxxflags}")
commit 388f1bc081bbd612c318ec9cf241911f0271f772
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Nov 11 19:49:52 2020 +0100
JBIG2Stream::readTextRegion: Prevent integer overflow on broken files
oss-fuzz/19177
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 60fbea49..3014c9e1 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -2251,7 +2251,10 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(bool huff, bool refine, int w, int h, u
} else {
arithDecoder->decodeInt(&dt, iaitStats);
}
- tt = t + dt;
+ if (unlikely(checkedAdd(t, dt, &tt))) {
+ delete bitmap;
+ return nullptr;
+ }
// symbol ID
if (huff) {
More information about the poppler
mailing list