diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-08-20 02:35:25 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-08-20 02:35:25 +0000 |
commit | af43ad58da2c6a3ee01a5ed8a6c963b688546977 (patch) | |
tree | 05f340e125e254a1af733997d0f4a5fde82c6c37 /Build/source | |
parent | cb347898b828962002aa4d2eb978ebe76cf56cf1 (diff) |
poppler 0.68.0
git-svn-id: svn://tug.org/texlive/trunk@48443 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
18 files changed, 402 insertions, 52 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README index d407e1b4b6e..24ae054bda6 100644 --- a/Build/source/libs/README +++ b/Build/source/libs/README @@ -49,7 +49,7 @@ mpfr 4.0.1 - checked 10feb18 pixman 0.34.0 - checked 04feb16 http://cairographics.org/releases/ -poppler 0.67.0 - checked 21jul18 +poppler 0.68.0 - checked 20aug18 http://poppler.freedesktop.org/ - used by luatex and xetex (requires C++11) diff --git a/Build/source/libs/poppler/ChangeLog b/Build/source/libs/poppler/ChangeLog index 948e7f1780d..e5cd68be0e2 100644 --- a/Build/source/libs/poppler/ChangeLog +++ b/Build/source/libs/poppler/ChangeLog @@ -1,3 +1,8 @@ +2018-08-20 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + Import poppler-0.68.0. + * version.ac: Adjust. + 2018-07-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp> Import poppler-0.67.0. diff --git a/Build/source/libs/poppler/TLpatches/ChangeLog b/Build/source/libs/poppler/TLpatches/ChangeLog index 80258903def..418de163d1c 100644 --- a/Build/source/libs/poppler/TLpatches/ChangeLog +++ b/Build/source/libs/poppler/TLpatches/ChangeLog @@ -1,3 +1,7 @@ +2018-08-20 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * patch-03-time: Adapted. + 2018-07-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * patch-03-time: Adapted. diff --git a/Build/source/libs/poppler/TLpatches/TL-Changes b/Build/source/libs/poppler/TLpatches/TL-Changes index 144aeb3f847..3a36f6927f8 100644 --- a/Build/source/libs/poppler/TLpatches/TL-Changes +++ b/Build/source/libs/poppler/TLpatches/TL-Changes @@ -1,4 +1,4 @@ -Changes applied to the poppler-0.67.0 tree as obtained from: +Changes applied to the poppler-0.68.0 tree as obtained from: http://poppler.freedesktop.org/ Removed unused dirs: diff --git a/Build/source/libs/poppler/TLpatches/patch-03-time b/Build/source/libs/poppler/TLpatches/patch-03-time index 0f25775b968..6b9d3d12a56 100644 --- a/Build/source/libs/poppler/TLpatches/patch-03-time +++ b/Build/source/libs/poppler/TLpatches/patch-03-time @@ -1,6 +1,6 @@ -diff -ur poppler-0.67.0/goo/gfile.h poppler-src/goo/gfile.h ---- poppler-0.67.0/goo/gfile.h Fri Jul 20 06:20:03 2018 -+++ poppler-src/goo/gfile.h Sat Jul 21 15:42:27 2018 +diff -ur poppler-0.68.0/goo/gfile.h poppler-src/goo/gfile.h +--- poppler-0.68.0/goo/gfile.h Mon Aug 20 06:37:51 2018 ++++ poppler-src/goo/gfile.h Mon Aug 20 11:17:15 2018 @@ -51,8 +51,6 @@ # include <windows.h> # endif @@ -10,9 +10,9 @@ diff -ur poppler-0.67.0/goo/gfile.h poppler-src/goo/gfile.h #else # include <unistd.h> # include <sys/types.h> -diff -ur poppler-0.67.0/poppler/Form.h poppler-src/poppler/Form.h ---- poppler-0.67.0/poppler/Form.h Fri Jul 20 06:20:03 2018 -+++ poppler-src/poppler/Form.h Sat Jul 21 15:43:15 2018 +diff -ur poppler-0.68.0/poppler/Form.h poppler-src/poppler/Form.h +--- poppler-0.68.0/poppler/Form.h Mon Aug 20 06:37:51 2018 ++++ poppler-src/poppler/Form.h Mon Aug 20 11:18:08 2018 @@ -36,6 +36,7 @@ #include <set> diff --git a/Build/source/libs/poppler/configure b/Build/source/libs/poppler/configure index a98031364d6..906dee62485 100755 --- a/Build/source/libs/poppler/configure +++ b/Build/source/libs/poppler/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for poppler (TeX Live) 0.67.0. +# Generated by GNU Autoconf 2.69 for poppler (TeX Live) 0.68.0. # # Report bugs to <tex-k@tug.org>. # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='poppler (TeX Live)' PACKAGE_TARNAME='poppler--tex-live-' -PACKAGE_VERSION='0.67.0' -PACKAGE_STRING='poppler (TeX Live) 0.67.0' +PACKAGE_VERSION='0.68.0' +PACKAGE_STRING='poppler (TeX Live) 0.68.0' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1307,7 +1307,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures poppler (TeX Live) 0.67.0 to adapt to many kinds of systems. +\`configure' configures poppler (TeX Live) 0.68.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1374,7 +1374,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of poppler (TeX Live) 0.67.0:";; + short | recursive ) echo "Configuration of poppler (TeX Live) 0.68.0:";; esac cat <<\_ACEOF @@ -1487,7 +1487,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -poppler (TeX Live) configure 0.67.0 +poppler (TeX Live) configure 0.68.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2134,7 +2134,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by poppler (TeX Live) $as_me 0.67.0, which was +It was created by poppler (TeX Live) $as_me 0.68.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4057,7 +4057,7 @@ fi # Define the identity of the package. PACKAGE='poppler--tex-live-' - VERSION='0.67.0' + VERSION='0.68.0' # Some tools Automake needs. @@ -7647,7 +7647,7 @@ ac_config_headers="$ac_config_headers poppler-config.h:poppler-src/poppler/poppl cat >>confdefs.h <<_ACEOF -#define POPPLER_VERSION "0.67.0" +#define POPPLER_VERSION "0.68.0" _ACEOF @@ -8341,7 +8341,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by poppler (TeX Live) $as_me 0.67.0, which was +This file was extended by poppler (TeX Live) $as_me 0.68.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8407,7 +8407,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -poppler (TeX Live) config.status 0.67.0 +poppler (TeX Live) config.status 0.68.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/libs/poppler/poppler-src/CMakeLists.txt b/Build/source/libs/poppler/poppler-src/CMakeLists.txt index cdfe779511e..cf3a542389e 100644 --- a/Build/source/libs/poppler/poppler-src/CMakeLists.txt +++ b/Build/source/libs/poppler/poppler-src/CMakeLists.txt @@ -30,7 +30,7 @@ if (ECM_FOUND) endif() set(POPPLER_MAJOR_VERSION "0") -set(POPPLER_MINOR_VERSION "67") +set(POPPLER_MINOR_VERSION "68") set(POPPLER_MICRO_VERSION "0") set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}") @@ -201,9 +201,9 @@ if(ENABLE_ZLIB_UNCOMPRESS AND NOT ENABLE_ZLIB) endif() set(WITH_OPENJPEG FALSE) if(ENABLE_LIBOPENJPEG STREQUAL "openjpeg2") - find_package(LIBOPENJPEG2) - set(WITH_OPENJPEG ${LIBOPENJPEG2_FOUND}) - if(NOT LIBOPENJPEG2_FOUND) + find_package(OpenJPEG) + set(WITH_OPENJPEG ${OpenJPEG_FOUND}) + if(NOT OpenJPEG_FOUND OR OPENJPEG_MAJOR_VERSION VERSION_LESS 2) message(FATAL_ERROR "Install libopenjpeg2 before trying to build poppler. You can also decide to use the internal unmaintained JPX decoder or none at all.") endif() set(HAVE_JPX_DECODER ON) @@ -276,8 +276,8 @@ if(TIFF_FOUND) include_directories(${TIFF_INCLUDE_DIR}) set(ENABLE_LIBTIFF ON) endif() -if(LIBOPENJPEG2_FOUND) - include_directories(${LIBOPENJPEG2_INCLUDE_DIRS}) +if(OpenJPEG_FOUND) + include_directories(${OPENJPEG_INCLUDE_DIRS}) endif() if(LCMS2_FOUND) include_directories(${LCMS2_INCLUDE_DIR}) @@ -457,11 +457,11 @@ if (ENABLE_NSS3) ) set(poppler_LIBS ${poppler_LIBS} ${NSS3_LIBRARIES}) endif() -if (LIBOPENJPEG2_FOUND) +if (OpenJPEG_FOUND) set(poppler_SRCS ${poppler_SRCS} poppler/JPEG2000Stream.cc ) - set(poppler_LIBS ${poppler_LIBS} ${LIBOPENJPEG2_LIBRARIES}) + set(poppler_LIBS ${poppler_LIBS} openjp2) else () set(poppler_SRCS ${poppler_SRCS} poppler/JPXStream.cc @@ -485,12 +485,11 @@ endif() if(MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS) -set(CMAKE_CXX_FLAGS "/Zc:wchar_t- ${CMAKE_CXX_FLAGS}") add_library(poppler STATIC ${poppler_SRCS}) else() add_library(poppler ${poppler_SRCS}) endif() -set_target_properties(poppler PROPERTIES VERSION 78.0.0 SOVERSION 78) +set_target_properties(poppler PROPERTIES VERSION 79.0.0 SOVERSION 79) if(MINGW) get_target_property(POPPLER_SOVERSION poppler SOVERSION) set_target_properties(poppler PROPERTIES SUFFIX "-${POPPLER_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}") @@ -621,7 +620,7 @@ if(ENABLE_XPDF_HEADERS) poppler/CurlPDFDocBuilder.h DESTINATION include/poppler) endif() - if(LIBOPENJPEG2_FOUND) + if(OpenJPEG_FOUND) install(FILES poppler/JPEG2000Stream.h DESTINATION include/poppler) diff --git a/Build/source/libs/poppler/poppler-src/ChangeLog b/Build/source/libs/poppler/poppler-src/ChangeLog index e8b09ae5273..a5d852168ec 100644 --- a/Build/source/libs/poppler/poppler-src/ChangeLog +++ b/Build/source/libs/poppler/poppler-src/ChangeLog @@ -1,3 +1,261 @@ +commit c666833e4163a93451eab27c675af9ca82d11593 +Author: Albert Astals Cid <aacid@kde.org> +Date: Sun Aug 19 23:37:51 2018 +0200 + + poppler 0.68 + + CMakeLists.txt | 4 ++-- + NEWS | 25 +++++++++++++++++++++++++ + cpp/Doxyfile | 2 +- + qt5/src/Doxyfile | 2 +- + 4 files changed, 29 insertions(+), 4 deletions(-) + +commit 9492eeb6af75d691a2131fa8481556b1ac86795c +Author: Albert Astals Cid <aacid@kde.org> +Date: Sun Aug 19 23:29:10 2018 +0200 + + Update (C) + + utils/HtmlFonts.cc | 1 + + 1 file changed, 1 insertion(+) + +commit 7a74c4071f001664c4383ea8e4e9d941bdb438b4 +Author: Albert Astals Cid <aacid@kde.org> +Date: Sun Aug 19 19:52:56 2018 +0200 + + Don't give a warning when Marked value is false + + Bug #107430 + + poppler/Catalog.cc | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +commit ce0f124ae2a50c51cae32b8c4e7559a9223ea3d5 +Author: Albert Astals Cid <aacid@kde.org> +Date: Sat Aug 18 23:58:40 2018 +0200 + + Make sure that the openjpeg we're getting is version 2 + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 06106d930b18a34c18e32734b73c212b852161a5 +Author: Aleksey Nikolaev <nae202@gmail.com> +Date: Thu Aug 16 17:20:00 2018 +0200 + + Fix build with MSVC + + cpp/poppler-page.cpp | 4 ++++ + cpp/poppler-page.h | 5 +++-- + 2 files changed, 7 insertions(+), 2 deletions(-) + +commit 04db8bd27db154e055a0d1715c0f81d4c37d6871 +Author: Albert Astals Cid <aacid@kde.org> +Date: Thu Aug 16 16:06:50 2018 +0200 + + LONG_LONG_MAX -> LLONG_MAX + + poppler/XRef.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 1b0b9e14e25494dfc08bbb9fe7232c7fca0d7f32 +Author: Hannah von Reth <vonreth@kde.org> +Date: Thu Aug 16 15:39:28 2018 +0200 + + Remove wchar_t- on MSVC + + Qt is built with wchar_t so if you try to build poppler without it, + there are conflicting types and everything fails + + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +commit 12bf632489587df9da416ed8303fb8aefc26bdac +Author: Albert Astals Cid <aacid@kde.org> +Date: Thu Aug 16 11:18:21 2018 +0200 + + Use OpenJpeg cmake config file instead of pkgconfig + + CMakeLists.txt | 16 ++++++++-------- + cmake/modules/FindLIBOPENJPEG2.cmake | 22 ---------------------- + 2 files changed, 8 insertions(+), 30 deletions(-) + +commit 0f35c2de35efa5689e4668b76a68c76de893fe7c +Author: Albert Astals Cid <aacid@kde.org> +Date: Thu Aug 9 17:04:38 2018 +0200 + + Fix spacing + + poppler/SignatureInfo.cc | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 90ace43c5bb52854b4fa1fdd224d0273b8fd6ff0 +Author: Chinmoy Ranjan Pradhan <chinmoyrp65@protonmail.com> +Date: Thu Aug 9 16:39:30 2018 +0200 + + [qt] Add Reason and Location to SignatureInfo + + Small tweaks (spacing) by Albert Astals Cid + + Bug #107299 + + qt5/src/poppler-form.cc | 17 +++++++++++++++++ + qt5/src/poppler-form.h | 13 +++++++++++++ + 2 files changed, 30 insertions(+) + +commit c9bf96aa99059ce0216a75ae2868b79d6e21bc3d +Author: Chinmoy Ranjan Pradhan <chinmoyrp65@protonmail.com> +Date: Thu Aug 9 16:35:14 2018 +0200 + + Add Reason and Location to SignatureInfo + + Small tweaks (const, etc) by Albert Astals Cid + + Bug #107299 + + poppler/Form.cc | 10 ++++++++++ + poppler/SignatureInfo.cc | 29 +++++++++++++++++++++++++++++ + poppler/SignatureInfo.h | 7 +++++++ + 3 files changed, 46 insertions(+) + +commit 9f8fb7aae92268c9460434abd4d970f04a9af926 +Author: Steven Boswell <ulatekh@yahoo.com> +Date: Thu Aug 9 16:16:10 2018 +0200 + + HtmlFont: Fix possible uninitialized variable & dangling reference + + Bug #107316 + + utils/HtmlFonts.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 1f8ab328f1440721fe7be7615a9d965a6e3d0439 +Author: Albert Astals Cid <aacid@kde.org> +Date: Thu Aug 9 00:40:14 2018 +0200 + + XRef::readXRef: Fix possible integer overflow + + fixes oss-fuzz/9777 + + poppler/XRef.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +commit c1e90bb19003af9ddf7a1ea88399d9ce47db233f +Author: Albert Astals Cid <aacid@kde.org> +Date: Mon Jul 23 23:05:14 2018 +0200 + + Always initialize SplashPipe:cSrcVal + + Fixes Use-of-uninitialized-value in oss-fuzz/9560 + + splash/Splash.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 71645d9e76f9bb075ae9b6599d281b8382e86e67 +Author: Albert Astals Cid <aacid@kde.org> +Date: Mon Jul 23 00:21:40 2018 +0200 + + Add (C) for the last commits + + poppler/SignatureHandler.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f9c7d61e36bb1fb0c77681b993fe5f4c2b1cd37e +Author: Albert Astals Cid <aacid@kde.org> +Date: Mon Jul 23 00:19:17 2018 +0200 + + Don't free signeddata nor signerinfo + + They get freed as part of freeing CMSMessage + + poppler/SignatureHandler.cc | 4 ---- + 1 file changed, 4 deletions(-) + +commit 54a75cb091b0994290e6b398b98e3113cd61355a +Author: Albert Astals Cid <aacid@kde.org> +Date: Mon Jul 23 00:18:50 2018 +0200 + + Don't destroy the cert, doesn't belong to us + + poppler/SignatureHandler.cc | 3 --- + 1 file changed, 3 deletions(-) + +commit 36f317d488d8ce6efb69db89a2eca09a98553ab5 +Author: Albert Astals Cid <aacid@kde.org> +Date: Sun Jul 22 23:48:03 2018 +0200 + + Copy subject dn instead of storing it + + It comes deep from the cert memory so it's destroyed shorting + after and + thus is invalid if we don't copy it + + poppler/SignatureInfo.cc | 6 ++++-- + poppler/SignatureInfo.h | 4 ++-- + 2 files changed, 6 insertions(+), 4 deletions(-) + +commit 6c4eaf5642439d87dafa03391441bb3e7f3a98c4 +Author: Zsombor Hollay-Horvath <hollay.horvath@gmail.com> +Date: Sat Jul 21 00:28:50 2018 +0200 + + cpp: Add rotation() to text_box + + Bug #106562 + + cpp/poppler-page.cpp | 7 +++++++ + cpp/poppler-page.h | 6 ++++++ + cpp/poppler-private.h | 2 ++ + 3 files changed, 15 insertions(+) + +commit bcd89bc0abb2cc05d3dc428074bb24b450ab7cf0 +Author: Thibaut Brard <thibaut.brard@gmail.com> +Date: Sat Jul 21 00:17:58 2018 +0200 + + pdftohtml: Add option to not round coordinates + + when outputing as xml + + utils/HtmlOutputDev.cc | 22 ++++++++++++++++++---- + utils/pdftohtml.1 | 3 +++ + utils/pdftohtml.cc | 4 ++++ + 3 files changed, 25 insertions(+), 4 deletions(-) + +commit 6ef17493c7d5344aba4278017724746e63659f7f +Author: Albert Astals Cid <aacid@kde.org> +Date: Sat Jul 21 00:14:07 2018 +0200 + + JpegWriter: Use the C++11 cascading constructors + + goo/JpegWriter.cc | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +commit 0b4ad184b479e24b13b0453b89859b75b699b131 +Author: Martin Packman <gzlist@googlemail.com> +Date: Fri Jul 20 23:34:37 2018 +0200 + + Add -jpegopt optimize option support to utils + + New option 'optimize=y' for utils that take a -jpegopt param, + pdftocairo and pdftoppm. This corresponds to the cjpeg -optimize + flag, and slightly reduces the size of the output jpeg but uses + additional cpu and memory. + + New jpegOptimize boolean in splash/SplashBitmap WriteImgParams. + + New setOptimize method on goo/JpegWriter taking a boolean. + + Update manpages for new option. + + goo/JpegWriter.cc | 12 ++++++++++++ + goo/JpegWriter.h | 2 ++ + splash/SplashBitmap.cc | 2 ++ + splash/SplashBitmap.h | 2 ++ + utils/pdftocairo.1 | 6 ++++++ + utils/pdftocairo.cc | 11 +++++++++++ + utils/pdftoppm.1 | 6 ++++++ + utils/pdftoppm.cc | 11 +++++++++++ + 8 files changed, 52 insertions(+) + commit 20d89699b35397f23352d0e60a3e19da2ce6b410 Author: Albert Astals Cid <aacid@kde.org> Date: Thu Jul 19 23:20:03 2018 +0200 diff --git a/Build/source/libs/poppler/poppler-src/NEWS b/Build/source/libs/poppler/poppler-src/NEWS index 8df783696a6..485f89ea57a 100644 --- a/Build/source/libs/poppler/poppler-src/NEWS +++ b/Build/source/libs/poppler/poppler-src/NEWS @@ -1,3 +1,28 @@ +Release 0.68.0 + core: + * Add Reason and Location to SignatureInfo. Bug #107299 + * Fix memory misuse on signature handling + * Fix security issues found by oss-fuzz + * Don't give a warning when Marked value is false. Bug #107430 + + qt5: + * Add Reason and Location to SignatureInfo. Bug #107299 + + cpp: + * Add rotation() to text_box. Bug #106562 + * Fix build with MSVC + + utils: + * pdftoppm: Add -jpegopt optimize option support + * pdftocairo: Add -jpegopt optimize option support + * pdftohtml: Add option to not round coordinates + * pdftohtml: Fix possible crash. Bug #107316 + + build system: + * Use OpenJpeg cmake config file instead of pkgconfig + * Remove wchar_t- on MSVC + + Release 0.67.0 core: * Fix lots of security/leak issues found by oss-fuzz diff --git a/Build/source/libs/poppler/poppler-src/goo/JpegWriter.cc b/Build/source/libs/poppler/poppler-src/goo/JpegWriter.cc index 37c15c2ab85..16c97afe768 100644 --- a/Build/source/libs/poppler/poppler-src/goo/JpegWriter.cc +++ b/Build/source/libs/poppler/poppler-src/goo/JpegWriter.cc @@ -9,7 +9,8 @@ // Copyright (C) 2010 Harry Roberts <harry.roberts@midnight-labs.org> // Copyright (C) 2011 Thomas Freitag <Thomas.Freitag@alfa.de> // Copyright (C) 2013 Peter Breitenlohner <peb@mppmu.mpg.de> -// Copyright (C) 2017 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2017, 2018 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2018 Martin Packman <gzlist@googlemail.com> // //======================================================================== @@ -25,6 +26,7 @@ extern "C" { struct JpegWriterPrivate { bool progressive; + bool optimize; int quality; JpegWriter::Format format; struct jpeg_compress_struct cinfo; @@ -46,16 +48,14 @@ JpegWriter::JpegWriter(int q, bool p, Format formatA) { priv = new JpegWriterPrivate; priv->progressive = p; + priv->optimize = false; priv->quality = q; priv->format = formatA; } JpegWriter::JpegWriter(Format formatA) + : JpegWriter(-1, false, formatA) { - priv = new JpegWriterPrivate; - priv->progressive = false; - priv->quality = -1; - priv->format = formatA; } JpegWriter::~JpegWriter() @@ -75,6 +75,11 @@ void JpegWriter::setProgressive(bool progressive) priv->progressive = progressive; } +void JpegWriter::setOptimize(bool optimize) +{ + priv->optimize = optimize; +} + bool JpegWriter::init(FILE *f, int width, int height, int hDPI, int vDPI) { // Setup error handler @@ -137,6 +142,9 @@ bool JpegWriter::init(FILE *f, int width, int height, int hDPI, int vDPI) jpeg_simple_progression(&priv->cinfo); } + // Set whether to compute optimal Huffman coding tables + priv->cinfo.optimize_coding = priv->optimize; + // Get ready for data jpeg_start_compress(&priv->cinfo, TRUE); diff --git a/Build/source/libs/poppler/poppler-src/goo/JpegWriter.h b/Build/source/libs/poppler/poppler-src/goo/JpegWriter.h index 9a68bcc9180..40de0ec2b28 100644 --- a/Build/source/libs/poppler/poppler-src/goo/JpegWriter.h +++ b/Build/source/libs/poppler/poppler-src/goo/JpegWriter.h @@ -11,6 +11,7 @@ // Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com> // Copyright (C) 2011 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2011 Thomas Freitag <Thomas.Freitag@alfa.de> +// Copyright (C) 2018 Martin Packman <gzlist@googlemail.com> // //======================================================================== @@ -41,6 +42,7 @@ public: void setQuality(int quality); void setProgressive(bool progressive); + void setOptimize(bool optimize); bool init(FILE *f, int width, int height, int hDPI, int vDPI) override; bool writePointers(unsigned char **rowPointers, int rowCount) override; diff --git a/Build/source/libs/poppler/poppler-src/poppler/Catalog.cc b/Build/source/libs/poppler/poppler-src/poppler/Catalog.cc index d259bda6b9c..e6fde7ab34d 100644 --- a/Build/source/libs/poppler/poppler-src/poppler/Catalog.cc +++ b/Build/source/libs/poppler/poppler-src/poppler/Catalog.cc @@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com> -// Copyright (C) 2005-2013, 2015, 2017 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2005-2013, 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2005 Jeff Muizelaar <jrmuizel@nit.ca> // Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com> // Copyright (C) 2005 Marco Pesenti Gritti <mpg@redhat.com> @@ -877,10 +877,13 @@ Guint Catalog::getMarkInfo() Object markInfoDict = catDict.dictLookup("MarkInfo"); if (markInfoDict.isDict()) { Object value = markInfoDict.dictLookup("Marked"); - if (value.isBool() && value.getBool()) - markInfo |= markInfoMarked; - else if (!value.isNull()) + if (value.isBool()) { + if (value.getBool()) { + markInfo |= markInfoMarked; + } + } else if (!value.isNull()) { error(errSyntaxError, -1, "Marked object is wrong type ({0:s})", value.getTypeName()); + } value = markInfoDict.dictLookup("Suspects"); if (value.isBool() && value.getBool()) diff --git a/Build/source/libs/poppler/poppler-src/poppler/Form.cc b/Build/source/libs/poppler/poppler-src/poppler/Form.cc index 1b2888e997f..3f2ab9a10bf 100644 --- a/Build/source/libs/poppler/poppler-src/poppler/Form.cc +++ b/Build/source/libs/poppler/poppler-src/poppler/Form.cc @@ -1635,6 +1635,16 @@ void FormFieldSignature::parseInfo() byte_range = sig_dict.dictLookup("ByteRange"); + const Object location_obj = sig_dict.dictLookup("Location"); + if (location_obj.isString()) { + signature_info->setLocation(location_obj.getString()->copy()->getCString()); + } + + const Object reason_obj = sig_dict.dictLookup("Reason"); + if (reason_obj.isString()) { + signature_info->setReason(reason_obj.getString()->copy()->getCString()); + } + // retrieve SigningTime Object time_of_signing = sig_dict.dictLookup("M"); if (time_of_signing.isString()) { diff --git a/Build/source/libs/poppler/poppler-src/poppler/SignatureHandler.cc b/Build/source/libs/poppler/poppler-src/poppler/SignatureHandler.cc index 6ddd1a84a39..a98e3f79b90 100644 --- a/Build/source/libs/poppler/poppler-src/poppler/SignatureHandler.cc +++ b/Build/source/libs/poppler/poppler-src/poppler/SignatureHandler.cc @@ -6,7 +6,7 @@ // // Copyright 2015, 2016 André Guerreiro <aguerreiro1985@gmail.com> // Copyright 2015 André Esser <bepandre@hotmail.com> -// Copyright 2015, 2016 Albert Astals Cid <aacid@kde.org> +// Copyright 2015, 2016, 2018 Albert Astals Cid <aacid@kde.org> // Copyright 2015 Markus Kilås <digital@markuspage.com> // Copyright 2017 Sebastian Rasmussen <sebras@gmail.com> // Copyright 2017 Hans-Ulrich Jüttner <huj@froreich-bioscientia.de> @@ -164,10 +164,6 @@ void SignatureHandler::updateHash(unsigned char * data_block, int data_len) SignatureHandler::~SignatureHandler() { SECITEM_FreeItem(&CMSitem, PR_FALSE); - if (CMSSignerInfo) - NSS_CMSSignerInfo_Destroy(CMSSignerInfo); - if (CMSSignedData) - NSS_CMSSignedData_Destroy(CMSSignedData); if (CMSMessage) NSS_CMSMessage_Destroy(CMSMessage); @@ -318,9 +314,6 @@ SECErrorCodes SignatureHandler::validateCertificate(time_t validation_time) retVal = (SECErrorCodes) PORT_GetError(); - if (cert) - CERT_DestroyCertificate(cert); - return retVal; } diff --git a/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.cc b/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.cc index 7ca8b969c70..76a54c0c083 100644 --- a/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.cc +++ b/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.cc @@ -7,7 +7,8 @@ // Copyright 2015 André Guerreiro <aguerreiro1985@gmail.com> // Copyright 2015 André Esser <bepandre@hotmail.com> // Copyright 2017 Hans-Ulrich Jüttner <huj@froreich-bioscientia.de> -// Copyright 2017 Albert Astals Cid <aacid@kde.org> +// Copyright 2017, 2018 Albert Astals Cid <aacid@kde.org> +// Copyright 2018 Chinmoy Ranjan Pradhan <chinmoyrp65@protonmail.com> // //======================================================================== @@ -32,6 +33,8 @@ SignatureInfo::SignatureInfo() cert_status = CERTIFICATE_NOT_VERIFIED; signer_name = nullptr; subject_dn = nullptr; + location = nullptr; + reason = nullptr; hash_type = HASH_AlgNULL; signing_time = 0; sig_subfilter_supported = false; @@ -43,6 +46,8 @@ SignatureInfo::SignatureInfo(SignatureValidationStatus sig_val_status, Certifica cert_status = cert_val_status; signer_name = nullptr; subject_dn = nullptr; + location = nullptr; + reason = nullptr; hash_type = HASH_AlgNULL; signing_time = 0; sig_subfilter_supported = false; @@ -50,7 +55,10 @@ SignatureInfo::SignatureInfo(SignatureValidationStatus sig_val_status, Certifica SignatureInfo::~SignatureInfo() { + free(location); + free(reason); free(signer_name); + free(subject_dn); } /* GETTERS */ @@ -75,6 +83,16 @@ const char *SignatureInfo::getSubjectDN() return subject_dn; } +const char *SignatureInfo::getLocation() const +{ + return location; +} + +const char *SignatureInfo::getReason() const +{ + return reason; +} + int SignatureInfo::getHashAlgorithm() { return hash_type; @@ -105,7 +123,20 @@ void SignatureInfo::setSignerName(char *signerName) void SignatureInfo::setSubjectDN(const char *subjectDN) { - subject_dn = subjectDN; + free(subject_dn); + subject_dn = strdup(subjectDN); +} + +void SignatureInfo::setLocation(char *loc) +{ + free(location); + location = loc; +} + +void SignatureInfo::setReason(char *signingReason) +{ + free(reason); + reason = signingReason; } void SignatureInfo::setHashAlgorithm(int type) diff --git a/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.h b/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.h index 35e7568ce7e..1e9f5f9d63e 100644 --- a/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.h +++ b/Build/source/libs/poppler/poppler-src/poppler/SignatureInfo.h @@ -6,8 +6,9 @@ // // Copyright 2015 André Guerreiro <aguerreiro1985@gmail.com> // Copyright 2015 André Esser <bepandre@hotmail.com> -// Copyright 2015, 2017 Albert Astals Cid <aacid@kde.org> +// Copyright 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org> // Copyright 2017 Hans-Ulrich Jüttner <huj@froreich-bioscientia.de> +// Copyright 2018 Chinmoy Ranjan Pradhan <chinmoyrp65@protonmail.com> // //======================================================================== @@ -49,6 +50,8 @@ public: CertificateValidationStatus getCertificateValStatus(); const char *getSignerName(); const char *getSubjectDN(); + const char *getLocation() const; + const char *getReason() const; int getHashAlgorithm(); // Returns a NSS3 HASH_HashType or -1 if compiled without NSS3 time_t getSigningTime(); bool isSubfilterSupported() { return sig_subfilter_supported; } @@ -58,6 +61,8 @@ public: void setCertificateValStatus(enum CertificateValidationStatus ); void setSignerName(char *); void setSubjectDN(const char *); + void setLocation(char *); + void setReason(char *); void setHashAlgorithm(int); void setSigningTime(time_t); void setSubFilterSupport(bool isSupported) { sig_subfilter_supported = isSupported; } @@ -69,7 +74,9 @@ private: SignatureValidationStatus sig_status; CertificateValidationStatus cert_status; char *signer_name; - const char *subject_dn; + char *subject_dn; + char *location; + char *reason; int hash_type; time_t signing_time; bool sig_subfilter_supported; diff --git a/Build/source/libs/poppler/poppler-src/poppler/XRef.cc b/Build/source/libs/poppler/poppler-src/poppler/XRef.cc index 6eadc0a193e..4352146ec45 100644 --- a/Build/source/libs/poppler/poppler-src/poppler/XRef.cc +++ b/Build/source/libs/poppler/poppler-src/poppler/XRef.cc @@ -509,6 +509,11 @@ GBool XRef::readXRef(Goffset *pos, std::vector<Goffset> *followedXRefStm, std::v Object obj; GBool more; + if (unlikely(start > (LLONG_MAX - *pos))) { + ok = gFalse; + return gFalse; + } + // start up a parser, parse one token parser = new Parser(nullptr, new Lexer(nullptr, diff --git a/Build/source/libs/poppler/version.ac b/Build/source/libs/poppler/version.ac index a9daa9391cb..7f633325435 100644 --- a/Build/source/libs/poppler/version.ac +++ b/Build/source/libs/poppler/version.ac @@ -9,4 +9,4 @@ dnl dnl -------------------------------------------------------- dnl dnl m4-include this file to define the current poppler version -m4_define([poppler_version], [0.67.0]) +m4_define([poppler_version], [0.68.0]) |