[Libreoffice-commits] core.git: 2 commits - sd/source stoc/source sw/source toolkit/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jan 14 08:55:51 UTC 2020
sd/source/filter/ppt/propread.cxx | 13 +++++++++++--
stoc/source/typeconv/convert.cxx | 3 +--
sw/source/core/layout/dumpfilter.cxx | 3 +--
toolkit/source/controls/grid/sortablegriddatamodel.cxx | 3 +--
toolkit/source/controls/roadmapentry.cxx | 3 +--
5 files changed, 15 insertions(+), 10 deletions(-)
New commits:
commit a62b421440de305a910d4ace4c146012f9f25e14
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jan 13 16:31:37 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jan 14 09:55:29 2020 +0100
ofz#20066 Timeout
Change-Id: Idd0ac51279c99e17c6f890096c7b6daf1b1802ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86703
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 1aaf42064a8c..6a8416343d6d 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -17,12 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <memory>
#include "propread.hxx"
#include <rtl/tencinfo.h>
#include <rtl/textenc.h>
#include <sal/log.hxx>
+#include <o3tl/sorted_vector.hxx>
#include <osl/diagnose.h>
+#include <memory>
PropEntry::PropEntry( sal_uInt32 nId, const sal_uInt8* pBuf, sal_uInt32 nBufSize ) :
mnId ( nId ),
@@ -348,7 +349,9 @@ void Section::Read( SotStorageStream *pStrm )
bool bVariant = ( nPropType == VT_VARIANT );
- for (sal_uInt32 i = 0; nPropSize && ( i < nVectorCount ); ++i)
+ o3tl::sorted_vector<sal_uInt64> aVisitedOffsets;
+
+ for (sal_uInt32 i = 0; nPropSize && i < nVectorCount && pStrm->good(); ++i)
{
if ( bVariant )
{
@@ -427,6 +430,12 @@ void Section::Read( SotStorageStream *pStrm )
nOffset = nPropOfs + nSecOfs + nPropSize;
if (!checkSeek(*pStrm, nOffset))
break;
+ // inserts returns false if an equivalent element already existed
+ if (!aVisitedOffsets.insert(nOffset).second)
+ {
+ SAL_WARN("sd.filter", "loop in Section::Read property list");
+ break;
+ }
}
}
else
commit edc748c9be3037a88c0f37ace160946e4fbd2a2d
Author: Mesut Çifci <mesutcifci97 at gmail.com>
AuthorDate: Tue Jan 14 00:19:58 2020 +0300
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Jan 14 09:55:15 2020 +0100
tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
Change-Id: I42b59c9d22edb987c55aace700934fdab95f83f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86719
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx
index 37d6c63e3d4b..97cb4bebd62c 100644
--- a/stoc/source/typeconv/convert.cxx
+++ b/stoc/source/typeconv/convert.cxx
@@ -251,8 +251,7 @@ sal_Bool TypeConverter_Impl::supportsService(const OUString& ServiceName)
// XServiceInfo
Sequence< OUString > TypeConverter_Impl::getSupportedServiceNames()
{
- Sequence< OUString > seqNames { "com.sun.star.script.Converter" };
- return seqNames;
+ return { "com.sun.star.script.Converter" };
}
diff --git a/sw/source/core/layout/dumpfilter.cxx b/sw/source/core/layout/dumpfilter.cxx
index 7e26bceb4397..2ba71faf74d9 100644
--- a/sw/source/core/layout/dumpfilter.cxx
+++ b/sw/source/core/layout/dumpfilter.cxx
@@ -148,8 +148,7 @@ namespace sw
uno::Sequence< OUString > LayoutDumpFilter::getSupportedServiceNames()
{
- uno::Sequence<OUString> aSeq { "com.sun.star.document.ExportFilter" };
- return aSeq;
+ return { "com.sun.star.document.ExportFilter" };
}
} // Namespace sw
diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx
index 6219cc5c06b5..711c7c23fa8d 100644
--- a/toolkit/source/controls/grid/sortablegriddatamodel.cxx
+++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx
@@ -878,8 +878,7 @@ void lcl_clear( STLCONTAINER& i_container )
Sequence< OUString > SAL_CALL SortableGridDataModel::getSupportedServiceNames( )
{
- Sequence< OUString > aServiceNames { "com.sun.star.awt.grid.SortableGridDataModel" };
- return aServiceNames;
+ return { "com.sun.star.awt.grid.SortableGridDataModel" };
}
diff --git a/toolkit/source/controls/roadmapentry.cxx b/toolkit/source/controls/roadmapentry.cxx
index d4580cd8c029..b79a23b2aa15 100644
--- a/toolkit/source/controls/roadmapentry.cxx
+++ b/toolkit/source/controls/roadmapentry.cxx
@@ -85,8 +85,7 @@ sal_Bool SAL_CALL ORoadmapEntry::supportsService( const OUString& ServiceName )
css::uno::Sequence< OUString > SAL_CALL ORoadmapEntry::getSupportedServiceNames( )
{
- css::uno::Sequence<OUString> aRet { "com.sun.star.awt.RoadmapItem" };
- return aRet;
+ return { "com.sun.star.awt.RoadmapItem" };
}
::cppu::IPropertyArrayHelper& ORoadmapEntry::getInfoHelper()
More information about the Libreoffice-commits
mailing list