[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-5-2' - 2 commits - configure.ac download.lst external/poppler
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Mar 13 14:54:22 UTC 2019
configure.ac | 137 +++++-----
download.lst | 4
external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1 | 27 +
external/poppler/UnpackedTarball_poppler.mk | 1
external/poppler/poppler-config.patch.1 | 12
5 files changed, 109 insertions(+), 72 deletions(-)
New commits:
commit 008a63b496d06646f9d40bf101f7cb88dba10cd1
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Feb 14 15:56:00 2017 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Mar 13 15:53:24 2019 +0100
Keep original CFLAGS etc. unmodified in configure.ac
...even if they are modified for the remaineder of configure.ac itself in the
MSVC 2015-specific code checking for UCRT. Otherwise, the flags determined by
LinkTarget.mk would lack any debug and optimization flags when building with
MSVC 2015.
Change-Id: Ib78418e0ad04bf2eae16a14b5c0904ba4f582eca
Reviewed-on: https://gerrit.libreoffice.org/34248
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit ed4b23548d28941f9b2c75207832afcb6c6ad0b3)
diff --git a/configure.ac b/configure.ac
index be3f4c261a69..169360f27472 100644
--- a/configure.ac
+++ b/configure.ac
@@ -910,6 +910,75 @@ AC_SUBST(WITH_MINGW)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_LIBS)
+# Check for explicit A/C/CXX/OBJC/OBJCXX/LDFLAGS.
+# By default use the ones specified by our build system,
+# but explicit override is possible.
+AC_MSG_CHECKING(for explicit AFLAGS)
+if test -n "$AFLAGS"; then
+ AC_MSG_RESULT([$AFLAGS])
+ x_AFLAGS=
+else
+ AC_MSG_RESULT(no)
+ x_AFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit CFLAGS)
+if test -n "$CFLAGS"; then
+ AC_MSG_RESULT([$CFLAGS])
+ x_CFLAGS=
+else
+ AC_MSG_RESULT(no)
+ x_CFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit CXXFLAGS)
+if test -n "$CXXFLAGS"; then
+ AC_MSG_RESULT([$CXXFLAGS])
+ x_CXXFLAGS=
+else
+ AC_MSG_RESULT(no)
+ x_CXXFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit OBJCFLAGS)
+if test -n "$OBJCFLAGS"; then
+ AC_MSG_RESULT([$OBJCFLAGS])
+ x_OBJCFLAGS=
+else
+ AC_MSG_RESULT(no)
+ x_OBJCFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit OBJCXXFLAGS)
+if test -n "$OBJCXXFLAGS"; then
+ AC_MSG_RESULT([$OBJCXXFLAGS])
+ x_OBJCXXFLAGS=
+else
+ AC_MSG_RESULT(no)
+ x_OBJCXXFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit LDFLAGS)
+if test -n "$LDFLAGS"; then
+ AC_MSG_RESULT([$LDFLAGS])
+ x_LDFLAGS=
+else
+ AC_MSG_RESULT(no)
+ x_LDFLAGS=[\#]
+fi
+AC_SUBST(AFLAGS)
+AC_SUBST(CFLAGS)
+AC_SUBST(CXXFLAGS)
+AC_SUBST(OBJCFLAGS)
+AC_SUBST(OBJCXXFLAGS)
+AC_SUBST(LDFLAGS)
+AC_SUBST(x_AFLAGS)
+AC_SUBST(x_CFLAGS)
+AC_SUBST(x_CXXFLAGS)
+AC_SUBST(x_OBJCFLAGS)
+AC_SUBST(x_OBJCXXFLAGS)
+AC_SUBST(x_LDFLAGS)
+
+dnl These are potentially set for MSVC, in the code checking for UCRT below:
+my_original_CFLAGS=$CFLAGS
+my_original_CXXFLAGS=$CXXFLAGS
+my_original_CPPFLAGS=$CPPFLAGS
+
dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
dnl Needs to precede the AC_SEARCH_LIBS call below, which apparently calls
dnl AC_PROG_CC internally.
@@ -4019,70 +4088,6 @@ if test "$enable_release_build" != yes -a \( -n "$ENABLE_SYMBOLS" -o -n "$ENABLE
fi
AC_SUBST(XCODE_DEBUG_INFORMATION_FORMAT)
-# Check for explicit A/C/CXX/OBJC/OBJCXX/LDFLAGS.
-# By default use the ones specified by our build system,
-# but explicit override is possible.
-AC_MSG_CHECKING(for explicit AFLAGS)
-if test -n "$AFLAGS"; then
- AC_MSG_RESULT([$AFLAGS])
- x_AFLAGS=
-else
- AC_MSG_RESULT(no)
- x_AFLAGS=[\#]
-fi
-AC_MSG_CHECKING(for explicit CFLAGS)
-if test -n "$CFLAGS"; then
- AC_MSG_RESULT([$CFLAGS])
- x_CFLAGS=
-else
- AC_MSG_RESULT(no)
- x_CFLAGS=[\#]
-fi
-AC_MSG_CHECKING(for explicit CXXFLAGS)
-if test -n "$CXXFLAGS"; then
- AC_MSG_RESULT([$CXXFLAGS])
- x_CXXFLAGS=
-else
- AC_MSG_RESULT(no)
- x_CXXFLAGS=[\#]
-fi
-AC_MSG_CHECKING(for explicit OBJCFLAGS)
-if test -n "$OBJCFLAGS"; then
- AC_MSG_RESULT([$OBJCFLAGS])
- x_OBJCFLAGS=
-else
- AC_MSG_RESULT(no)
- x_OBJCFLAGS=[\#]
-fi
-AC_MSG_CHECKING(for explicit OBJCXXFLAGS)
-if test -n "$OBJCXXFLAGS"; then
- AC_MSG_RESULT([$OBJCXXFLAGS])
- x_OBJCXXFLAGS=
-else
- AC_MSG_RESULT(no)
- x_OBJCXXFLAGS=[\#]
-fi
-AC_MSG_CHECKING(for explicit LDFLAGS)
-if test -n "$LDFLAGS"; then
- AC_MSG_RESULT([$LDFLAGS])
- x_LDFLAGS=
-else
- AC_MSG_RESULT(no)
- x_LDFLAGS=[\#]
-fi
-AC_SUBST(AFLAGS)
-AC_SUBST(CFLAGS)
-AC_SUBST(CXXFLAGS)
-AC_SUBST(OBJCFLAGS)
-AC_SUBST(OBJCXXFLAGS)
-AC_SUBST(LDFLAGS)
-AC_SUBST(x_AFLAGS)
-AC_SUBST(x_CFLAGS)
-AC_SUBST(x_CXXFLAGS)
-AC_SUBST(x_OBJCFLAGS)
-AC_SUBST(x_OBJCXXFLAGS)
-AC_SUBST(x_LDFLAGS)
-
#
# determine CPUNAME, OS, ...
# The USING_X11 flag tells whether the host os uses X by default. Can be overriden with the --without-x option.
@@ -12962,6 +12967,10 @@ if test -f config_host_lang.mk; then
config_lang_md5=`$MD5SUM config_host_lang.mk | sed "s/ .*//"`
fi
+CFLAGS=$my_original_CFLAGS
+CXXFLAGS=$my_original_CXXFLAGS
+CPPFLAGS=$my_original_CPPFLAGS
+
AC_CONFIG_FILES([config_host.mk
config_host_lang.mk
Makefile
commit 5c49ccb23c4c1fb77e3f318b4a4d1cf5a5bcf86d
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Mar 12 12:57:20 2019 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Mar 13 11:18:05 2019 +0100
poppler: upgrade to release 0.74.0
Fixes CVE-2019-7310.
Add patch to fix CVE-2019-9200 too.
CVE-2018-20662 looks irrelevant because we don't build pdfunite tool.
Reviewed-on: https://gerrit.libreoffice.org/69094
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit f9b354784faf65ecc8024cf6d7d7aaf589f6d91f)
Change-Id: I5e7ddabbb341f6bfefb376d552b50c4006f41906
diff --git a/download.lst b/download.lst
index 272f185dae95..fe71ec204ea1 100644
--- a/download.lst
+++ b/download.lst
@@ -131,8 +131,8 @@ export PAGEMAKER_TARBALL := libpagemaker-0.0.3.tar.bz2
export PIXMAN_TARBALL := c63f411b3ad147db2bcce1bf262a0e02-pixman-0.24.4.tar.bz2
export PNG_MD5SUM := 897ccec1ebfb0922e83c2bfaa1be8748
export PNG_TARBALL := libpng-1.6.28.tar.gz
-export POPPLER_MD5SUM := 1fc64bd358c9f31d0c88a7f2b0d8b23d
-export POPPLER_TARBALL := poppler-0.73.0.tar.xz
+export POPPLER_MD5SUM := 1ce581bde2f23fa55bee13d8c61ac0df
+export POPPLER_TARBALL := poppler-0.74.0.tar.xz
export POSTGRESQL_TARBALL := c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2
ifeq ($(PYTHON_VERSION_MINOR),3)
diff --git a/external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1 b/external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1
new file mode 100644
index 000000000000..b459a0a0bef7
--- /dev/null
+++ b/external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1
@@ -0,0 +1,27 @@
+From f4136a6353162db249f63ddb0f20611622ab61b4 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid at kde.org>
+Date: Wed, 27 Feb 2019 19:43:22 +0100
+Subject: [PATCH] ImageStream::getLine: fix crash on broken files
+
+Fixes #728
+---
+ poppler/Stream.cc | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/poppler/Stream.cc b/poppler/Stream.cc
+index 33537b0e..a41435ab 100644
+--- a/poppler/Stream.cc
++++ b/poppler/Stream.cc
+@@ -496,6 +496,9 @@ unsigned char *ImageStream::getLine() {
+ }
+
+ int readChars = str->doGetChars(inputLineSize, inputLine);
++ if (unlikely(readChars == -1)) {
++ readChars = 0;
++ }
+ for ( ; readChars < inputLineSize; readChars++) inputLine[readChars] = EOF;
+ if (nBits == 1) {
+ unsigned char *p = inputLine;
+--
+2.20.1
+
diff --git a/external/poppler/UnpackedTarball_poppler.mk b/external/poppler/UnpackedTarball_poppler.mk
index ee5f6de7cec9..8a38987cab09 100644
--- a/external/poppler/UnpackedTarball_poppler.mk
+++ b/external/poppler/UnpackedTarball_poppler.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,poppler,\
$(if $(filter MSC-120,$(COM)-$(VCVER)),external/poppler/poppler-snprintf.patch.1) \
external/poppler/poppler-config.patch.1 \
external/poppler/poppler-c++11.patch.1 \
+ external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1 \
))
# std::make_unique is only available in C++14
diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1
index e312573f1ff3..1c68806276f7 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.1
@@ -195,7 +195,7 @@ index 0fbd336a..451213f8 100644
+#define PACKAGE_NAME "poppler"
+
+/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING "poppler 0.73.0"
++#define PACKAGE_STRING "poppler 0.74.0"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "poppler"
@@ -204,7 +204,7 @@ index 0fbd336a..451213f8 100644
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
-+#define PACKAGE_VERSION "0.73.0"
++#define PACKAGE_VERSION "0.74.0"
+
+/* Poppler data dir */
+#define POPPLER_DATADIR "/usr/local/share/poppler"
@@ -228,7 +228,7 @@ index 0fbd336a..451213f8 100644
+/* #undef USE_FLOAT */
+
+/* Version number of package */
-+#define VERSION "0.73.0"
++#define VERSION "0.74.0"
+
+#if defined(__APPLE__)
+#elif defined (_WIN32)
@@ -304,7 +304,7 @@ index 0fbd336a..451213f8 100644
+
+/* Defines the poppler version. */
+#ifndef POPPLER_VERSION
-+#define POPPLER_VERSION "0.73.0"
++#define POPPLER_VERSION "0.74.0"
+#endif
+
+/* Enable multithreading support. */
@@ -466,9 +466,9 @@ index 0fbd336a..451213f8 100644
+
+#include "poppler-global.h"
+
-+#define POPPLER_VERSION "0.73.0"
++#define POPPLER_VERSION "0.74.0"
+#define POPPLER_VERSION_MAJOR 0
-+#define POPPLER_VERSION_MINOR 73
++#define POPPLER_VERSION_MINOR 74
+#define POPPLER_VERSION_MICRO 0
+
+namespace poppler
More information about the Libreoffice-commits
mailing list