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
83de961e
Kaydet (Commit)
83de961e
authored
Ock 26, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#1244945 Untrusted value as argument
Change-Id: Ic969ea78a53d0a67591dd476bc01fbdce18c7eab
üst
381ea043
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
poly2.cxx
tools/source/generic/poly2.cxx
+10
-1
No files found.
tools/source/generic/poly2.cxx
Dosyayı görüntüle @
83de961e
...
@@ -582,7 +582,7 @@ SvStream& ReadPolyPolygon( SvStream& rIStream, tools::PolyPolygon& rPolyPoly )
...
@@ -582,7 +582,7 @@ SvStream& ReadPolyPolygon( SvStream& rIStream, tools::PolyPolygon& rPolyPoly )
const
size_t
nMaxRecords
=
rIStream
.
remainingSize
()
/
nMinRecordSize
;
const
size_t
nMaxRecords
=
rIStream
.
remainingSize
()
/
nMinRecordSize
;
if
(
nPolyCount
>
nMaxRecords
)
if
(
nPolyCount
>
nMaxRecords
)
{
{
SAL_WARN
(
"
vcl.gdi
"
,
"Parsing error: "
<<
nMaxRecords
<<
SAL_WARN
(
"
tools
"
,
"Parsing error: "
<<
nMaxRecords
<<
" max possible entries, but "
<<
nPolyCount
<<
" claimed, truncating"
);
" max possible entries, but "
<<
nPolyCount
<<
" claimed, truncating"
);
nPolyCount
=
nMaxRecords
;
nPolyCount
=
nMaxRecords
;
}
}
...
@@ -636,6 +636,15 @@ void PolyPolygon::Read( SvStream& rIStream )
...
@@ -636,6 +636,15 @@ void PolyPolygon::Read( SvStream& rIStream )
// Read number of polygons
// Read number of polygons
rIStream
.
ReadUInt16
(
nPolyCount
);
rIStream
.
ReadUInt16
(
nPolyCount
);
const
size_t
nMinRecordSize
=
sizeof
(
sal_uInt16
);
const
size_t
nMaxRecords
=
rIStream
.
remainingSize
()
/
nMinRecordSize
;
if
(
nPolyCount
>
nMaxRecords
)
{
SAL_WARN
(
"tools"
,
"Parsing error: "
<<
nMaxRecords
<<
" max possible entries, but "
<<
nPolyCount
<<
" claimed, truncating"
);
nPolyCount
=
nMaxRecords
;
}
if
(
nPolyCount
)
if
(
nPolyCount
)
{
{
if
(
mpImplPolyPolygon
->
mnRefCount
>
1
)
if
(
mpImplPolyPolygon
->
mnRefCount
>
1
)
...
...
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