diff --git a/.gitignore b/.gitignore index f313864..d381f26 100644 --- a/.gitignore +++ b/.gitignore @@ -6,9 +6,9 @@ /f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf /libreoffice-multiliblauncher.sh /dtoa-20180411.tgz -/libreoffice-7.1.3.2.tar.xz -/libreoffice-7.1.3.2.tar.xz.asc -/libreoffice-help-7.1.3.2.tar.xz -/libreoffice-help-7.1.3.2.tar.xz.asc -/libreoffice-translations-7.1.3.2.tar.xz -/libreoffice-translations-7.1.3.2.tar.xz.asc +/libreoffice-7.1.4.2.tar.xz +/libreoffice-7.1.4.2.tar.xz.asc +/libreoffice-help-7.1.4.2.tar.xz +/libreoffice-help-7.1.4.2.tar.xz.asc +/libreoffice-translations-7.1.4.2.tar.xz +/libreoffice-translations-7.1.4.2.tar.xz.asc diff --git a/0001-Related-tdf-138888-fix-assertion-on-avmedia-MediaCon.patch b/0001-Related-tdf-138888-fix-assertion-on-avmedia-MediaCon.patch deleted file mode 100644 index 372e523..0000000 --- a/0001-Related-tdf-138888-fix-assertion-on-avmedia-MediaCon.patch +++ /dev/null @@ -1,42 +0,0 @@ -From f4e496af66bc6a779f600158cc42b986d654f143 Mon Sep 17 00:00:00 2001 -From: Julien Nabet -Date: Mon, 14 Dec 2020 19:45:22 +0100 -Subject: [PATCH] Related tdf#138888: fix assertion on avmedia/MediaControlBase - -Assertion when trying to insert a video in Impress, see bt: -https://bugs.documentfoundation.org/attachment.cgi?id=168161 - -According to https://en.cppreference.com/w/cpp/algorithm/clamp -"behavior is undefined if the value of lo is greater than hi" - -Regression from: -commit 36b3b357fe2a882db6a5f5a006239e16200fb847 -Author: Noel -Date: Thu Nov 12 16:10:56 2020 +0200 - - replace std::min(std::max()) with std::clamp - -Change-Id: Idf33eb6c662b60174678f990f98aefc72edec2a6 -Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107722 -Tested-by: Jenkins -Reviewed-by: Noel Grandin ---- - avmedia/source/framework/MediaControlBase.cxx | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/avmedia/source/framework/MediaControlBase.cxx b/avmedia/source/framework/MediaControlBase.cxx -index ef92cce8a736..890bb04d805b 100644 ---- a/avmedia/source/framework/MediaControlBase.cxx -+++ b/avmedia/source/framework/MediaControlBase.cxx -@@ -64,7 +64,7 @@ void MediaControlBase::UpdateVolumeSlider( MediaItem const & aMediaItem ) - { - mxVolumeSlider->set_sensitive(true); - const sal_Int32 nVolumeDB = aMediaItem.getVolumeDB(); -- mxVolumeSlider->set_value( std::clamp( nVolumeDB, sal_Int32(0), AVMEDIA_DB_RANGE ) ); -+ mxVolumeSlider->set_value( std::clamp( nVolumeDB, AVMEDIA_DB_RANGE, sal_Int32(0)) ); - } - } - --- -2.31.1 - diff --git a/0001-Replace-inet_ntoa-with-inet_ntop.patch b/0001-Replace-inet_ntoa-with-inet_ntop.patch new file mode 100644 index 0000000..ed8ab7e --- /dev/null +++ b/0001-Replace-inet_ntoa-with-inet_ntop.patch @@ -0,0 +1,162 @@ +From 366e9237399a948d2ef616b758d390bd7d0978a5 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Mon, 31 May 2021 09:36:28 +0200 +Subject: [PATCH] Replace inet_ntoa with inet_ntop + +...as inet_ntoa is potentially not thread-safe; and add a test + +Change-Id: I9df945b006ba7194c3b1444c4886101c08339ad0 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116425 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +(cherry picked from commit 33bf4f0bcf941ee4609f558442035514f54cbc8a) + +and + +Replace inet_addr with inet_pton + +...as inet_addr is deprecated (it does not allow to distinguish successful +return for "255.255.255.255" from -1 error return); and update tests + +Change-Id: I605cb2ba18fe9bd11d2d68c8f1c94271c4503509 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116441 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +(cherry picked from commit 1fef071c01caf6c293dd941ee7c8340e6894afc3) + +fix leak in SocketTest + +Change-Id: I8c5e2d4c4687beab08876fe3e945d19a1629bc36 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116514 +Tested-by: Jenkins +Reviewed-by: Noel Grandin +(cherry picked from commit 313eaf979ea2d69e4ffa88a5e87cc09ffe0ff088) +--- + sal/CppunitTest_sal_osl.mk | 1 + + sal/osl/unx/socket.cxx | 16 +++++++---- + sal/qa/osl/socket.cxx | 58 ++++++++++++++++++++++++++++++++++++++ + 3 files changed, 70 insertions(+), 5 deletions(-) + create mode 100644 sal/qa/osl/socket.cxx + +diff --git a/sal/CppunitTest_sal_osl.mk b/sal/CppunitTest_sal_osl.mk +index 2e4b77509f56..d8c2627d9e0f 100644 +--- a/sal/CppunitTest_sal_osl.mk ++++ b/sal/CppunitTest_sal_osl.mk +@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sal_osl,\ + sal/qa/osl/process/osl_Thread \ + sal/qa/osl/profile/osl_old_testprofile \ + sal/qa/osl/setthreadname/test-setthreadname \ ++ sal/qa/osl/socket \ + )) + + $(eval $(call gb_CppunitTest_use_libraries,sal_osl,\ +diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx +index 56a8f6cd63ac..9fafc6d1db81 100644 +--- a/sal/osl/unx/socket.cxx ++++ b/sal/osl/unx/socket.cxx +@@ -437,7 +437,10 @@ oslSocketAddr SAL_CALL osl_createInetBroadcastAddr ( + &pDottedAddr, strDottedAddr->buffer, strDottedAddr->length, + RTL_TEXTENCODING_UTF8, OUSTRING_TO_OSTRING_CVTFLAGS); + +- nAddr = inet_addr (pDottedAddr->buffer); ++ in_addr buf; ++ if (inet_pton (AF_INET, pDottedAddr->buffer, &buf) == 1) { ++ nAddr = buf.s_addr; ++ } + rtl_string_release (pDottedAddr); + } + +@@ -505,11 +508,11 @@ oslSocketAddr osl_psz_createInetSocketAddr ( + sal_Int32 Port) + { + oslSocketAddr pAddr = nullptr; +- sal_Int32 Addr = inet_addr(pszDottedAddr); +- if(Addr != -1) ++ in_addr buf; ++ if(inet_pton(AF_INET, pszDottedAddr, &buf) == 1) + { + /* valid dotted addr */ +- pAddr = createSocketAddrWithFamily( osl_Socket_FamilyInet, htons(Port) , Addr ); ++ pAddr = createSocketAddrWithFamily( osl_Socket_FamilyInet, htons(Port) , buf.s_addr ); + } + return pAddr; + } +@@ -1090,7 +1093,10 @@ oslSocketResult SAL_CALL osl_getDottedInetAddrOfSocketAddr(oslSocketAddr Addr, r + return osl_Socket_Error; + } + +- rtl_uString_newFromAscii(ustrDottedInetAddr,inet_ntoa(pSystemInetAddr->sin_addr)); ++ char buf[INET_ADDRSTRLEN]; ++ auto const text = inet_ntop(AF_INET, &pSystemInetAddr->sin_addr, buf, INET_ADDRSTRLEN); ++ assert(text != nullptr); ++ rtl_uString_newFromAscii(ustrDottedInetAddr,text); + + return osl_Socket_Ok; + +diff --git a/sal/qa/osl/socket.cxx b/sal/qa/osl/socket.cxx +new file mode 100644 +index 000000000000..ed31c9ede7ae +--- /dev/null ++++ b/sal/qa/osl/socket.cxx +@@ -0,0 +1,58 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ ++/* ++ * This file is part of the LibreOffice project. ++ * ++ * This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++namespace ++{ ++class SocketTest : public CppUnit::TestFixture ++{ ++ CPPUNIT_TEST_SUITE(SocketTest); ++ CPPUNIT_TEST(test_createInetSocketAddr); ++ CPPUNIT_TEST(test_createInetBroadcastAddr); ++ CPPUNIT_TEST_SUITE_END(); ++ ++ void test_createInetSocketAddr() ++ { ++ OUString const in("123.4.56.78"); ++ auto const addr = osl_createInetSocketAddr(in.pData, 100); ++ CPPUNIT_ASSERT(addr != nullptr); ++ CPPUNIT_ASSERT_EQUAL(osl_Socket_FamilyInet, osl_getFamilyOfSocketAddr(addr)); ++ OUString out; ++ auto const res = osl_getDottedInetAddrOfSocketAddr(addr, &out.pData); ++ CPPUNIT_ASSERT_EQUAL(osl_Socket_Ok, res); ++ CPPUNIT_ASSERT_EQUAL(in, out); ++ CPPUNIT_ASSERT_EQUAL(sal_Int32(100), osl_getInetPortOfSocketAddr(addr)); ++ osl_destroySocketAddr(addr); ++ } ++ ++ void test_createInetBroadcastAddr() ++ { ++ OUString const in("123.4.56.78"); ++ auto const addr = osl_createInetBroadcastAddr(in.pData, 100); ++ CPPUNIT_ASSERT(addr != nullptr); ++ CPPUNIT_ASSERT_EQUAL(osl_Socket_FamilyInet, osl_getFamilyOfSocketAddr(addr)); ++ OUString out; ++ auto const res = osl_getDottedInetAddrOfSocketAddr(addr, &out.pData); ++ CPPUNIT_ASSERT_EQUAL(osl_Socket_Ok, res); ++ CPPUNIT_ASSERT_EQUAL(OUString("123.255.255.255"), out); ++ CPPUNIT_ASSERT_EQUAL(sal_Int32(100), osl_getInetPortOfSocketAddr(addr)); ++ osl_destroySocketAddr(addr); ++ } ++}; ++ ++CPPUNIT_TEST_SUITE_REGISTRATION(SocketTest); ++} ++ ++/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ +-- +2.31.1 + diff --git a/0001-dtd-files-are-not-xml-files-and-shouldn-t-have-xml-h.patch b/0001-dtd-files-are-not-xml-files-and-shouldn-t-have-xml-h.patch new file mode 100644 index 0000000..d43dd9d --- /dev/null +++ b/0001-dtd-files-are-not-xml-files-and-shouldn-t-have-xml-h.patch @@ -0,0 +1,201 @@ +From 3a19d8b8309070f8c14f3a3b4dc4b098ad64190f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 9 Jun 2021 10:20:57 +0100 +Subject: [PATCH 1/2] dtd files are not xml files and shouldn't have xml + headers + +so rpminspect is correct in complaining that they are not valid xml +on inspecting files claiming to be xml + +Change-Id: I70379989326c2ea63e6a54b3658ebea4684fa5df +--- + framework/dtd/accelerator.dtd | 1 - + framework/dtd/event.dtd | 1 - + framework/dtd/groupuinames.dtd | 1 - + framework/dtd/image.dtd | 1 - + framework/dtd/menubar.dtd | 1 - + framework/dtd/statusbar.dtd | 1 - + framework/dtd/toolbar.dtd | 1 - + i18npool/source/localedata/data/locale.dtd | 1 - + officecfg/registry/component-schema.dtd | 1 - + officecfg/registry/component-update.dtd | 1 - + package/dtd/Manifest.dtd | 1 - + xmerge/source/xmerge/converter.dtd | 1 - + xmloff/dtd/office.dtd | 1 - + xmlscript/dtd/dialog.dtd | 1 - + xmlscript/dtd/libraries.dtd | 2 -- + xmlscript/dtd/library.dtd | 2 -- + xmlscript/dtd/module.dtd | 2 -- + 17 files changed, 20 deletions(-) + +diff --git a/framework/dtd/accelerator.dtd b/framework/dtd/accelerator.dtd +index f4dcac65242d..912b652d3cf5 100644 +--- a/framework/dtd/accelerator.dtd ++++ b/framework/dtd/accelerator.dtd +@@ -1,4 +1,3 @@ +- +