[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - external/libetonyek

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 19 05:47:40 UTC 2018


 external/libetonyek/UnpackedTarball_libetonyek.mk         |    1 
 external/libetonyek/forcepoint.parsepath.null.deref.patch |   44 ++++++++++++++
 2 files changed, 45 insertions(+)

New commits:
commit 43fe4c8327b1d93d7b801282a1c7b856035a8b4d
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 18 21:11:13 2018 +0000
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Dec 19 06:47:19 2018 +0100

    forcepoint#77 null-deref
    
    Change-Id: Ib4d546f1e44eb6a682ec7cbbaab7a0a2050ffa1c
    Reviewed-on: https://gerrit.libreoffice.org/65379
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/external/libetonyek/UnpackedTarball_libetonyek.mk b/external/libetonyek/UnpackedTarball_libetonyek.mk
index d90e44955687..eb38615ffe31 100644
--- a/external/libetonyek/UnpackedTarball_libetonyek.mk
+++ b/external/libetonyek/UnpackedTarball_libetonyek.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libetonyek,\
 	external/libetonyek/rpath.patch \
 	external/libetonyek/warnings.patch \
 	external/libetonyek/initial-creator.patch.1 \
+	external/libetonyek/forcepoint.parsepath.null.deref.patch \
 ))
 
 ifneq ($(OS),MACOSX)
diff --git a/external/libetonyek/forcepoint.parsepath.null.deref.patch b/external/libetonyek/forcepoint.parsepath.null.deref.patch
new file mode 100644
index 000000000000..2cdf6a5a34c2
--- /dev/null
+++ b/external/libetonyek/forcepoint.parsepath.null.deref.patch
@@ -0,0 +1,44 @@
+diff -ru src/lib/IWAParser.cpp libetonyek/src/lib/IWAParser.cpp
+--- src/lib/IWAParser.cpp	2018-12-18 21:02:45.772942197 +0000
++++ src/lib/IWAParser.cpp	2018-12-18 21:05:04.758548097 +0000
+@@ -998,7 +998,14 @@
+       if (get(type) == 1)
+         path->appendMoveTo(get(coords).m_x, get(coords).m_y);
+       else
++      {
++        if (path->empty())
++        {
++          ETONYEK_DEBUG_MSG(("IWAParser::parsePath: missing prior MoveTo subsequent LineTo\n", get(type) == 1 ? 'M' : 'L'));
++          return false;
++        }
+         path->appendLineTo(get(coords).m_x, get(coords).m_y);
++      }
+       break;
+     }
+     case 4 :
+diff -ru src/lib/IWORKPath.cpp libetonyek/src/lib/IWORKPath.cpp
+--- src/lib/IWORKPath.cpp	2018-12-18 21:02:45.775942059 +0000
++++ src/lib/IWORKPath.cpp	2018-12-18 21:03:39.289480143 +0000
+@@ -594,6 +594,11 @@
+   m_impl->m_closed = false;
+ }
+ 
++bool IWORKPath::empty() const
++{
++  return m_impl->m_path.empty();
++}
++
+ void IWORKPath::appendMoveTo(const double x, const double y)
+ {
+   if (!m_impl->m_path.empty() && m_impl->m_path.back().size()<=1)
+diff -ru src/lib/IWORKPath.h libetonyek/src/lib/IWORKPath.h
+--- src/lib/IWORKPath.h	2018-12-18 21:02:45.772942197 +0000
++++ src/lib/IWORKPath.h	2018-12-18 21:05:48.323543888 +0000
+@@ -42,6 +42,7 @@
+   void swap(IWORKPath &other);
+ 
+   void clear();
++  bool empty() const;
+ 
+   void appendMoveTo(double x, double y);
+   void appendLineTo(double x, double y);


More information about the Libreoffice-commits mailing list