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
42732d25
Kaydet (Commit)
42732d25
authored
Agu 27, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
don't loop on overly-short nEndPos
Change-Id: I60d3388ece28a69c31a85b9e3b495cbe8a03e7dc
üst
fa1807ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
hang-3.wmf
vcl/qa/cppunit/graphicfilter/data/wmf/fail/hang-3.wmf
+0
-0
enhwmf.cxx
vcl/source/filter/wmf/enhwmf.cxx
+14
-5
No files found.
vcl/qa/cppunit/graphicfilter/data/wmf/fail/hang-3.wmf
0 → 100644
Dosyayı görüntüle @
42732d25
File added
vcl/source/filter/wmf/enhwmf.cxx
Dosyayı görüntüle @
42732d25
...
@@ -617,7 +617,7 @@ void EnhWMFReader::ReadAndDrawPolyPolygon()
...
@@ -617,7 +617,7 @@ void EnhWMFReader::ReadAndDrawPolyPolygon()
bool
EnhWMFReader
::
ReadEnhWMF
()
bool
EnhWMFReader
::
ReadEnhWMF
()
{
{
sal_uInt32
nStretchBltMode
=
0
;
sal_uInt32
nStretchBltMode
=
0
;
sal_uInt32
n
RecType
(
0
),
nRecSize
(
0
),
n
NextPos
(
0
),
sal_uInt32
nNextPos
(
0
),
nW
(
0
),
nH
(
0
),
nColor
(
0
),
nIndex
(
0
),
nW
(
0
),
nH
(
0
),
nColor
(
0
),
nIndex
(
0
),
nDat32
(
0
),
nNom1
(
0
),
nDen1
(
0
),
nNom2
(
0
),
nDen2
(
0
);
nDat32
(
0
),
nNom1
(
0
),
nDen1
(
0
),
nNom2
(
0
),
nDen2
(
0
);
sal_Int32
nX32
(
0
),
nY32
(
0
),
nx32
(
0
),
ny32
(
0
);
sal_Int32
nX32
(
0
),
nY32
(
0
),
nx32
(
0
),
ny32
(
0
);
...
@@ -629,7 +629,8 @@ bool EnhWMFReader::ReadEnhWMF()
...
@@ -629,7 +629,8 @@ bool EnhWMFReader::ReadEnhWMF()
while
(
bStatus
&&
nRecordCount
--
&&
pWMF
->
good
())
while
(
bStatus
&&
nRecordCount
--
&&
pWMF
->
good
())
{
{
pWMF
->
ReadUInt32
(
nRecType
).
ReadUInt32
(
nRecSize
);
sal_uInt32
nRecType
(
0
),
nRecSize
(
0
);
pWMF
->
ReadUInt32
(
nRecType
).
ReadUInt32
(
nRecSize
);
if
(
!
pWMF
->
good
()
||
(
nRecSize
<
8
)
||
(
nRecSize
&
3
)
)
// Parameters are always divisible by 4
if
(
!
pWMF
->
good
()
||
(
nRecSize
<
8
)
||
(
nRecSize
&
3
)
)
// Parameters are always divisible by 4
{
{
...
@@ -637,14 +638,22 @@ bool EnhWMFReader::ReadEnhWMF()
...
@@ -637,14 +638,22 @@ bool EnhWMFReader::ReadEnhWMF()
break
;
break
;
}
}
const
sal_uInt32
nMaxPossibleRecSize
=
nEndPos
-
pWMF
->
Tell
()
+
8
;
auto
nCurPos
=
pWMF
->
Tell
();
if
(
nEndPos
<
nCurPos
-
8
)
{
bStatus
=
false
;
break
;
}
const
sal_uInt32
nMaxPossibleRecSize
=
nEndPos
-
(
nCurPos
-
8
);
if
(
nRecSize
>
nMaxPossibleRecSize
)
if
(
nRecSize
>
nMaxPossibleRecSize
)
{
{
bStatus
=
false
;
bStatus
=
false
;
break
;
break
;
}
}
nNextPos
=
pWMF
->
Tell
()
+
(
nRecSize
-
8
);
nNextPos
=
nCurPos
+
(
nRecSize
-
8
);
if
(
!
aBmpSaveList
.
empty
()
if
(
!
aBmpSaveList
.
empty
()
&&
(
nRecType
!=
EMR_STRETCHBLT
)
&&
(
nRecType
!=
EMR_STRETCHBLT
)
...
@@ -1423,7 +1432,7 @@ bool EnhWMFReader::ReadEnhWMF()
...
@@ -1423,7 +1432,7 @@ bool EnhWMFReader::ReadEnhWMF()
case
EMR_EXTTEXTOUTW
:
case
EMR_EXTTEXTOUTW
:
{
{
sal_Int32
nLeft
,
nTop
,
nRight
,
nBottom
,
ptlReferenceX
,
ptlReferenceY
,
nGfxMode
,
nXScale
,
nYScale
;
sal_Int32
nLeft
,
nTop
,
nRight
,
nBottom
,
ptlReferenceX
,
ptlReferenceY
,
nGfxMode
,
nXScale
,
nYScale
;
sal_uInt32
n
CurPos
,
n
OffString
,
nOptions
,
offDx
;
sal_uInt32
nOffString
,
nOptions
,
offDx
;
sal_Int32
nLen
;
sal_Int32
nLen
;
std
::
vector
<
long
>
aDX
;
std
::
vector
<
long
>
aDX
;
...
...
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