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
580d3837
Kaydet (Commit)
580d3837
authored
Agu 28, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
clip strings to max available size
Change-Id: Icc1378c9c27b9b6d229bcffc6a63017f82be70d4
üst
fe1eb880
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
hang-18.ppt
sd/qa/unit/data/ppt/pass/hang-18.ppt
+0
-0
propread.cxx
sd/source/filter/ppt/propread.cxx
+19
-6
No files found.
sd/qa/unit/data/ppt/pass/hang-18.ppt
0 → 100644
Dosyayı görüntüle @
580d3837
File added
sd/source/filter/ppt/propread.cxx
Dosyayı görüntüle @
580d3837
...
...
@@ -73,7 +73,7 @@ static sal_Int32 lcl_getMaxSafeStrLen(sal_uInt32 nSize)
bool
PropItem
::
Read
(
OUString
&
rString
,
sal_uInt32
nStringType
,
bool
bAlign
)
{
sal_uInt32
i
,
nItemSize
,
nType
,
nItemPos
;
sal_uInt32
nType
,
nItemPos
;
bool
bRetValue
=
false
;
nItemPos
=
Tell
();
...
...
@@ -86,8 +86,8 @@ bool PropItem::Read( OUString& rString, sal_uInt32 nStringType, bool bAlign )
else
nType
=
nStringType
&
VT_TYPEMASK
;
nItemSize
=
0
;
// Initialize in case stream fails.
ReadUInt32
(
nItemSize
);
sal_uInt32
nItemSize
(
0
)
;
// Initialize in case stream fails.
ReadUInt32
(
nItemSize
);
switch
(
nType
)
{
...
...
@@ -95,6 +95,12 @@ bool PropItem::Read( OUString& rString, sal_uInt32 nStringType, bool bAlign )
{
if
(
nItemSize
)
{
auto
nMaxSizePossible
=
remainingSize
();
if
(
nItemSize
>
nMaxSizePossible
)
{
SAL_WARN
(
"sd.filter"
,
"String of Len "
<<
nItemSize
<<
" claimed, only "
<<
nMaxSizePossible
<<
" possible"
);
nItemSize
=
nMaxSizePossible
;
}
try
{
sal_Char
*
pString
=
new
sal_Char
[
nItemSize
];
...
...
@@ -104,7 +110,7 @@ bool PropItem::Read( OUString& rString, sal_uInt32 nStringType, bool bAlign )
if
(
nItemSize
>
1
)
{
sal_Unicode
*
pWString
=
reinterpret_cast
<
sal_Unicode
*>
(
pString
);
for
(
i
=
0
;
i
<
nItemSize
;
i
++
)
for
(
sal_uInt32
i
=
0
;
i
<
nItemSize
;
++
i
)
ReadUInt16
(
pWString
[
i
]
);
rString
=
OUString
(
pWString
,
lcl_getMaxSafeStrLen
(
nItemSize
));
}
...
...
@@ -140,12 +146,19 @@ bool PropItem::Read( OUString& rString, sal_uInt32 nStringType, bool bAlign )
{
if
(
nItemSize
)
{
auto
nMaxSizePossible
=
remainingSize
()
/
sizeof
(
sal_Unicode
);
if
(
nItemSize
>
nMaxSizePossible
)
{
SAL_WARN
(
"sd.filter"
,
"String of Len "
<<
nItemSize
<<
" claimed, only "
<<
nMaxSizePossible
<<
" possible"
);
nItemSize
=
nMaxSizePossible
;
}
try
{
sal_Unicode
*
pString
=
new
sal_Unicode
[
nItemSize
];
for
(
i
=
0
;
i
<
nItemSize
;
i
++
)
for
(
sal_uInt32
i
=
0
;
i
<
nItemSize
;
++
i
)
ReadUInt16
(
pString
[
i
]
);
if
(
pString
[
i
-
1
]
==
0
)
if
(
pString
[
nItemSize
-
1
]
==
0
)
{
if
(
(
sal_uInt16
)
nItemSize
>
1
)
rString
=
OUString
(
pString
,
lcl_getMaxSafeStrLen
(
nItemSize
));
...
...
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