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
de26ef85
Kaydet (Commit)
de26ef85
authored
Agu 23, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#1242865 Untrusted loop bound
Change-Id: I9c6f821f7bd1e9bd3eb8f47e269e62a792523f1a
üst
ca09871b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
image.cxx
basic/source/classes/image.cxx
+12
-2
No files found.
basic/source/classes/image.cxx
Dosyayı görüntüle @
de26ef85
...
...
@@ -241,6 +241,17 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
break
;
}
case
B_SBXOBJECTS
:
{
//assuming an empty string with just the lead 32bit/16bit len indicator
const
size_t
nMinStringSize
=
(
eCharSet
==
RTL_TEXTENCODING_UNICODE
)
?
4
:
2
;
const
size_t
nMinRecordSize
=
nMinStringSize
+
sizeof
(
sal_Int16
);
const
size_t
nMaxRecords
=
r
.
remainingSize
()
/
nMinRecordSize
;
if
(
nCount
>
nMinRecordSize
)
{
SAL_WARN
(
"basic"
,
"Parsing error: "
<<
nMaxRecords
<<
" max possible entries, but "
<<
nCount
<<
" claimed, truncating"
);
nCount
=
nMaxRecords
;
}
// User defined types
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
i
++
)
...
...
@@ -319,9 +330,8 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
AddType
(
pType
);
}
break
;
}
case
B_MODEND
:
goto
done
;
default
:
...
...
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