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
724f2b20
Kaydet (Commit)
724f2b20
authored
Eki 19, 2016
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#1373663 Untrusted loop bound
Change-Id: Iabad14f8fc35656015b98693dd327a41aeaf63c7
üst
0ae76ce8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
backupfilehelper.cxx
comphelper/source/misc/backupfilehelper.cxx
+8
-8
No files found.
comphelper/source/misc/backupfilehelper.cxx
Dosyayı görüntüle @
724f2b20
...
...
@@ -105,14 +105,7 @@ namespace
// read rTarget
if
(
osl
::
File
::
E_None
==
rFile
->
read
(
static_cast
<
void
*>
(
aArray
),
4
,
nBaseRead
)
&&
4
==
nBaseRead
)
{
//This is untainted data which comes from a controlled source
//so, using a byte-swapping pattern which coverity doesn't
//detect as such
//http://security.coverity.com/blog/2014/Apr/on-detecting-heartbleed-with-static-analysis.html
rTarget
=
aArray
[
0
];
rTarget
<<=
8
;
rTarget
|=
aArray
[
1
];
rTarget
<<=
8
;
rTarget
|=
aArray
[
2
];
rTarget
<<=
8
;
rTarget
|=
aArray
[
3
];
rTarget
=
(
sal_uInt32
(
aArray
[
0
])
<<
24
)
+
(
sal_uInt32
(
aArray
[
1
])
<<
16
)
+
(
sal_uInt32
(
aArray
[
2
])
<<
8
)
+
sal_uInt32
(
aArray
[
3
]);
return
true
;
}
...
...
@@ -674,6 +667,13 @@ namespace
return
false
;
}
// coverity#1373663 Untrusted loop bound, check file size
// isn't utterly broken
sal_uInt64
nFileSize
(
0
);
rFile
->
getSize
(
nFileSize
);
if
(
nFileSize
<
nExtEntries
)
return
false
;
for
(
sal_uInt32
a
(
0
);
a
<
nExtEntries
;
a
++
)
{
ExtensionInfoEntry
aNewEntry
;
...
...
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