external/liborcus/UnpackedTarball_liborcus.mk | 1 external/liborcus/forcepoint-83.patch.1 | 16 +++++++-------- external/liborcus/forcepoint-84.patch.1 | 16 +++++++-------- external/liborcus/forcepoint-87.patch.1 | 27 ++++++++++++++++++++++++++ 4 files changed, 44 insertions(+), 16 deletions(-)
New commits: commit d2efb6236e6a6a522de15c1332473884abd63967 Author: Caolán McNamara <[email protected]> AuthorDate: Fri Mar 25 09:12:30 2022 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Apr 1 12:49:45 2022 +0200 forcepoint#87 Assertion 'mp_char <= mp_end' failed Change-Id: I434928cb2425a2e8eb9440dff67f52cda241b2d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132097 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit 32019baffa19a8f79cacf93d5dd5a95c7d416657) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132407 Reviewed-by: Michael Stahl <[email protected]> diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk index 8f41fdbf9173..948b92753539 100644 --- a/external/liborcus/UnpackedTarball_liborcus.mk +++ b/external/liborcus/UnpackedTarball_liborcus.mk @@ -29,6 +29,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ external/liborcus/std-get-busted.patch.1 \ external/liborcus/forcepoint-83.patch.1 \ external/liborcus/forcepoint-84.patch.1 \ + external/liborcus/forcepoint-87.patch.1 \ )) ifeq ($(OS),WNT) diff --git a/external/liborcus/forcepoint-87.patch.1 b/external/liborcus/forcepoint-87.patch.1 new file mode 100644 index 000000000000..c1a58dde59c4 --- /dev/null +++ b/external/liborcus/forcepoint-87.patch.1 @@ -0,0 +1,27 @@ +From e4f3741197a3af6d434850d388483b523138a214 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <[email protected]> +Date: Thu, 24 Mar 2022 21:31:14 +0000 +Subject: [PATCH] forcepoint#87 Assertion `mp_char <= mp_end' failed + +soffice.bin: ../../include/orcus/parser_base.hpp:65: bool orcus::parser_base::has_char() const: Assertion `mp_char <= mp_end' failed. +--- + src/parser/sax_parser_base.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/parser/sax_parser_base.cpp b/src/parser/sax_parser_base.cpp +index 46acb81d..cb7a9c04 100644 +--- a/src/parser/sax_parser_base.cpp ++++ b/src/parser/sax_parser_base.cpp +@@ -295,7 +295,8 @@ void parser_base::value_with_encoded_char(cell_buffer& buf, std::string_view& st + + // Skip the closing quote. + assert(!has_char() || cur_char() == quote_char); +- next(); ++ if (has_char()) ++ next(); + } + + bool parser_base::value(std::string_view& str, bool decode) +-- +2.35.1 + commit 3f5eed10b5d38fae9f6d308c8b55c49e58d33f40 Author: Caolán McNamara <[email protected]> AuthorDate: Thu Mar 24 08:56:39 2022 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Apr 1 12:49:29 2022 +0200 forcepoint#83 forcepoint#84 update to upstream fix Change-Id: I5add09b4379a1f86a720af75b758389424f4f50b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132055 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit 2323fa29617e4919226517d50abbb9ad33b320ca) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132406 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/external/liborcus/forcepoint-83.patch.1 b/external/liborcus/forcepoint-83.patch.1 index bfd3bb86fcf9..644c0dcfff4e 100644 --- a/external/liborcus/forcepoint-83.patch.1 +++ b/external/liborcus/forcepoint-83.patch.1 @@ -1,4 +1,4 @@ -From 283b45ba3bcb22dc28303a09a96c9b94f86d1ba2 Mon Sep 17 00:00:00 2001 +From 4d58816e995a562f26f3cc5006ae9ddd46b1bbed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <[email protected]> Date: Wed, 23 Mar 2022 16:44:00 +0000 Subject: [PATCH] forcepoint#83 Invalid read of size 1 @@ -17,22 +17,22 @@ Subject: [PATCH] forcepoint#83 Invalid read of size 1 ==343916== by 0x30E60945: (anonymous namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&) (filterdetect.cxx:83) ==343916== by 0x30E60ABE: non-virtual thunk to (anonymous namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&) (filterdetect.cxx:0) --- - include/orcus/sax_parser.hpp | 2 ++ - 1 file changed, 2 insertions(+) + include/orcus/sax_parser.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/orcus/sax_parser.hpp b/include/orcus/sax_parser.hpp -index 15e8d917..d0fc45b5 100644 +index 15e8d917..2e707568 100644 --- a/include/orcus/sax_parser.hpp +++ b/include/orcus/sax_parser.hpp -@@ -255,6 +255,8 @@ void sax_parser<_Handler,_Config>::element_open(std::ptrdiff_t begin_pos) +@@ -255,7 +255,7 @@ void sax_parser<_Handler,_Config>::element_open(std::ptrdiff_t begin_pos) while (true) { skip_space_and_control(); -+ if (!has_char()) -+ return; - char c = cur_char(); +- char c = cur_char(); ++ char c = cur_char_checked(); if (c == '/') { + // Self-closing element: <element/> -- 2.35.1 diff --git a/external/liborcus/forcepoint-84.patch.1 b/external/liborcus/forcepoint-84.patch.1 index 99aa0b9623b5..bbe05340bc63 100644 --- a/external/liborcus/forcepoint-84.patch.1 +++ b/external/liborcus/forcepoint-84.patch.1 @@ -1,4 +1,4 @@ -From 0fee6c0e3074be11874f1911a76f10eef5f59985 Mon Sep 17 00:00:00 2001 +From ec469f774bb91302c4df21eff1314dfd508d37c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <[email protected]> Date: Wed, 23 Mar 2022 20:04:31 +0000 Subject: [PATCH] forcepoint#84 Invalid read of size 1 @@ -17,22 +17,22 @@ Subject: [PATCH] forcepoint#84 Invalid read of size 1 ==356879== by 0x11BE3855: orcus::orcus_xlsx::detect(unsigned char const*, unsigned long) (orcus_xlsx.cpp:188) ==356879== by 0x11AB2492: orcus::detect(unsigned char const*, unsigned long) (format_detection.cpp:60) --- - src/parser/sax_parser_base.cpp | 2 ++ - 1 file changed, 2 insertions(+) + src/parser/sax_parser_base.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/sax_parser_base.cpp b/src/parser/sax_parser_base.cpp -index 46acb81d..11791edc 100644 +index 46acb81d..1cee821e 100644 --- a/src/parser/sax_parser_base.cpp +++ b/src/parser/sax_parser_base.cpp -@@ -300,6 +300,8 @@ void parser_base::value_with_encoded_char(cell_buffer& buf, std::string_view& st +@@ -300,7 +300,7 @@ void parser_base::value_with_encoded_char(cell_buffer& buf, std::string_view& st bool parser_base::value(std::string_view& str, bool decode) { -+ if (!has_char()) -+ throw malformed_xml_error("value must be quoted", offset()); - char c = cur_char(); +- char c = cur_char(); ++ char c = cur_char_checked(); if (c != '"' && c != '\'') throw malformed_xml_error("value must be quoted", offset()); + -- 2.35.1
