diff options
Diffstat (limited to 'external/libetonyek')
-rw-r--r-- | external/libetonyek/UnpackedTarball_libetonyek.mk | 1 | ||||
-rw-r--r-- | external/libetonyek/forcepoint.parsepath.null.deref.patch | 44 |
2 files changed, 45 insertions, 0 deletions
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); |