Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
711e7454
Kaydet (Commit)
711e7454
authored
Eki 17, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#1242624 Untrusted loop bound
Change-Id: If2ae1982eec100f5602a13d648beec247ced6aa2
üst
a4e01070
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
20 deletions
+44
-20
msdffimp.cxx
filter/source/msfilter/msdffimp.cxx
+44
-20
No files found.
filter/source/msfilter/msdffimp.cxx
Dosyayı görüntüle @
711e7454
...
@@ -1905,7 +1905,13 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
...
@@ -1905,7 +1905,13 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
sal_uInt16 nNumElemMem = 0;
sal_uInt16 nNumElemMem = 0;
rIn.ReadUInt16( nNumElem ).ReadUInt16( nNumElemMem ).ReadUInt16( nElemSize );
rIn.ReadUInt16( nNumElem ).ReadUInt16( nNumElemMem ).ReadUInt16( nElemSize );
}
}
if ( nElemSize == 36 )
bool bImport = false;
if (nElemSize == 36)
{
//sanity check that the stream is long enough to fulfill nNumElem * nElemSize;
bImport = rIn.remainingSize() / nElemSize >= nNumElem;
}
if (bImport)
{
{
uno::Sequence< beans::PropertyValues > aHandles( nNumElem );
uno::Sequence< beans::PropertyValues > aHandles( nNumElem );
for ( sal_uInt16 i = 0; i < nNumElem; i++ )
for ( sal_uInt16 i = 0; i < nNumElem; i++ )
...
@@ -2317,12 +2323,19 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
...
@@ -2317,12 +2323,19 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
sal_uInt16 nNumElemMem = 0;
sal_uInt16 nNumElemMem = 0;
rIn.ReadUInt16( nNumElem ).ReadUInt16( nNumElemMem ).ReadUInt16( nElemSize );
rIn.ReadUInt16( nNumElem ).ReadUInt16( nNumElemMem ).ReadUInt16( nElemSize );
}
}
if ( nElemSize == 16 )
bool bImport = false;
if (nElemSize == 16)
{
//sanity check that the stream is long enough to fulfill nNumElem * nElemSize;
bImport = rIn.remainingSize() / nElemSize >= nNumElem;
}
if (bImport)
{
{
sal_Int32 nLeft, nTop, nRight, nBottom;
com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeTextFrame > aTextFrames( nNumElem );
com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeTextFrame > aTextFrames( nNumElem );
for (
sal_uInt16 i = 0; i < nNumElem; i++
)
for (
sal_uInt16 i = 0; i < nNumElem; ++i
)
{
{
sal_Int32 nLeft(0), nTop(0), nRight(0), nBottom(0);
rIn.ReadInt32( nLeft )
rIn.ReadInt32( nLeft )
.ReadInt32( nTop )
.ReadInt32( nTop )
.ReadInt32( nRight )
.ReadInt32( nRight )
...
@@ -2350,26 +2363,37 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
...
@@ -2350,26 +2363,37 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
if ( SeekToContent( DFF_Prop_connectorPoints, rIn ) )
if ( SeekToContent( DFF_Prop_connectorPoints, rIn ) )
rIn.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert );
rIn.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert );
sal_Int32 nX, nY;
bool bImport = false;
sal_Int16 nTmpA, nTmpB;
if (nNumElemVert)
aGluePoints.realloc( nNumElemVert );
for ( sal_uInt16 i = 0; i < nNumElemVert; i++ )
{
{
if ( nElemSizeVert == 8 )
//sanity check that the stream is long enough to fulfill nNumElemVert * nElemSizeVert;
{
bImport = rIn.remainingSize() / nElemSizeVert >= nNumElemVert;
rIn.ReadInt32( nX )
}
.ReadInt32( nY );
}
if (bImport)
else
{
aGluePoints.realloc( nNumElemVert );
for (sal_uInt16 i = 0; i < nNumElemVert; ++i)
{
{
rIn.ReadInt16( nTmpA )
sal_Int32 nX(0), nY(0);
.ReadInt16( nTmpB );
if ( nElemSizeVert == 8 )
{
rIn.ReadInt32( nX )
.ReadInt32( nY );
}
else
{
sal_Int16 nTmpA(0), nTmpB(0);
nX = nTmpA;
rIn.ReadInt16( nTmpA )
nY = nTmpB;
.ReadInt16( nTmpB );
nX = nTmpA;
nY = nTmpB;
}
EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aGluePoints[ i ].First, nX );
EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aGluePoints[ i ].Second, nY );
}
}
EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aGluePoints[ i ].First, nX );
EnhancedCustomShape2d::SetEnhancedCustomShapeParameter( aGluePoints[ i ].Second, nY );
}
}
const OUString sGluePoints( "GluePoints" );
const OUString sGluePoints( "GluePoints" );
aProp.Name = sGluePoints;
aProp.Name = sGluePoints;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment