[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - 2 commits - sot/source sw/source
Caolán McNamara
caolanm at redhat.com
Sat Apr 21 00:01:54 UTC 2018
sot/source/sdstor/stgstrms.cxx | 4 ++--
sw/source/filter/ww8/ww8toolbar.cxx | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 1883d5d365fe7021ae5366fdb0dbc15169b4858e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Feb 9 10:49:39 2018 +0000
ofz#6173 check index before use
Change-Id: I09d15ab324af0a8b3566f11868eb3266a68c4afe
Reviewed-on: https://gerrit.libreoffice.org/49500
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit e355d7d691cfe9719b06e15129d86ec22a2bd7a4)
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index 056839aae6e9..abdc9458f212 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -166,7 +166,9 @@ bool SwCTBWrapper::Read( SvStream& rS )
std::vector< sal_Int16 >::iterator it_end = dropDownMenuIndices.end();
for ( std::vector< sal_Int16 >::iterator it = dropDownMenuIndices.begin(); it != it_end; ++it )
{
- rCustomizations[ *it ].bIsDroppedMenuTB = true;
+ if (*it < 0 || static_cast<size_t>(*it) >= rCustomizations.size())
+ continue;
+ rCustomizations[*it].bIsDroppedMenuTB = true;
}
return rS.good();
}
commit 38962e0dfede9087f0a53caf8a06ad5129a77fcc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jan 27 19:38:12 2018 +0000
ofz#5747 short->sal_Int32 like in StgDataStrm
Change-Id: I254c00b1142d7187beabe5d18532efec036de494
Reviewed-on: https://gerrit.libreoffice.org/48757
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 59cf6c6128f67d807de58fae2d7fae2b4909ad68)
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 4f749486c1cc..212949d546d2 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -1047,7 +1047,7 @@ sal_Int32 StgSmallStrm::Read( void* pBuf, sal_Int32 n )
// small stream is likely to be < 64 KBytes.
if( ( m_nPos + n ) > m_nSize )
n = m_nSize - m_nPos;
- short nDone = 0;
+ sal_Int32 nDone = 0;
while( n )
{
short nBytes = m_nPageSize - m_nOffset;
@@ -1078,7 +1078,7 @@ sal_Int32 StgSmallStrm::Write( const void* pBuf, sal_Int32 n )
{
// you can safely assume that reads are not huge, since the
// small stream is likely to be < 64 KBytes.
- short nDone = 0;
+ sal_Int32 nDone = 0;
if( ( m_nPos + n ) > m_nSize )
{
sal_Int32 nOld = m_nPos;
More information about the Libreoffice-commits
mailing list