From 3e57f46c67ae06c30ec2da2c37c602d34af24dab Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 24 Mar 2022 08:56:39 +0000 Subject: forcepoint#83 forcepoint#84 update to upstream fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5add09b4379a1f86a720af75b758389424f4f50b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132055 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 2323fa29617e4919226517d50abbb9ad33b320ca) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132412 Reviewed-by: Michael Stahl --- external/liborcus/forcepoint-83.patch.1 | 16 ++++++++-------- external/liborcus/forcepoint-84.patch.1 | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) 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?= 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&) (filterdetect.cxx:83) ==343916== by 0x30E60ABE: non-virtual thunk to (anonymous namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence&) (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: -- 2.35.1 diff --git a/external/liborcus/forcepoint-84.patch.1 b/external/liborcus/forcepoint-84.patch.1 index 3bd8e26465a9..462fc8bd972d 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?= 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 -@@ -298,6 +298,8 @@ +@@ -298,7 +298,7 @@ void parser_base::value_with_encoded_char(cell_buffer& buf, std::string_view& st bool parser_base::value(pstring& 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 -- cgit