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
a177c4c7
Kaydet (Commit)
a177c4c7
authored
Kas 18, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Avoid overflow
Change-Id: Ia80682aeb87225b9bde7398186e121b1d3bdc2ad
üst
9ffb35db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
unoidlprovider.cxx
unoidl/source/unoidlprovider.cxx
+9
-3
No files found.
unoidl/source/unoidlprovider.cxx
Dosyayı görüntüle @
a177c4c7
...
...
@@ -630,7 +630,9 @@ rtl::Reference< Entity > readEntity(
throw
FileFormatException
(
file
->
uri
,
"UNOIDL format: too many items in module"
);
}
if
(
offset
+
5
+
8
*
n
>
file
->
size
)
{
//TODO: overflow
if
(
sal_uInt64
(
offset
)
+
5
+
8
*
sal_uInt64
(
n
)
>
file
->
size
)
// cannot overflow
{
throw
FileFormatException
(
file
->
uri
,
"UNOIDL format: module map offset + size too large"
);
...
...
@@ -954,7 +956,9 @@ rtl::Reference< Entity > readEntity(
file
->
uri
,
"UNOIDL format: too many constants in constant group"
);
}
if
(
offset
+
5
+
8
*
n
>
file
->
size
)
{
//TODO: overflow
if
(
sal_uInt64
(
offset
)
+
5
+
8
*
sal_uInt64
(
n
)
>
file
->
size
)
// cannot overflow
{
throw
FileFormatException
(
file
->
uri
,
(
"UNOIDL format: constant group map offset + size too"
...
...
@@ -1237,7 +1241,9 @@ rtl::Reference< Entity > UnoidlProvider::findEntity(OUString const & name) const
}
}
mapSize
=
file_
->
read32
(
off
+
1
);
if
(
8
*
mapSize
>
file_
->
size
-
off
-
5
)
{
//TODO: overflow
if
(
sal_uInt64
(
off
)
+
5
+
8
*
sal_uInt64
(
mapSize
)
>
file_
->
size
)
// cannot overflow
{
throw
FileFormatException
(
file_
->
uri
,
"UNOIDL format: map offset + size too large"
);
}
...
...
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