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
04d34c63
Kaydet (Commit)
04d34c63
authored
Eki 23, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#1242688 Untrusted loop bound
Change-Id: Ic3e2c390de22d3e998daf760d73619218da020ec
üst
d4617ef9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
19 deletions
+31
-19
svdfppt.cxx
filter/source/msfilter/svdfppt.cxx
+31
-19
No files found.
filter/source/msfilter/svdfppt.cxx
Dosyayı görüntüle @
04d34c63
...
@@ -4507,7 +4507,9 @@ PPTTextRulerInterpreter::PPTTextRulerInterpreter( sal_uInt32 nFileOfs, SdrPowerP
...
@@ -4507,7 +4507,9 @@ PPTTextRulerInterpreter::PPTTextRulerInterpreter( sal_uInt32 nFileOfs, SdrPowerP
}
}
if
(
nFileOfs
)
if
(
nFileOfs
)
{
{
sal_Int16
nTCount
;
bool
bRecordOk
=
true
;
sal_Int16
nTCount
(
0
);
sal_Int32
i
;
sal_Int32
i
;
rIn
.
ReadInt32
(
mpImplRuler
->
nFlags
);
rIn
.
ReadInt32
(
mpImplRuler
->
nFlags
);
...
@@ -4518,10 +4520,16 @@ PPTTextRulerInterpreter::PPTTextRulerInterpreter( sal_uInt32 nFileOfs, SdrPowerP
...
@@ -4518,10 +4520,16 @@ PPTTextRulerInterpreter::PPTTextRulerInterpreter( sal_uInt32 nFileOfs, SdrPowerP
rIn
.
ReadUInt16
(
mpImplRuler
->
nDefaultTab
);
rIn
.
ReadUInt16
(
mpImplRuler
->
nDefaultTab
);
if
(
mpImplRuler
->
nFlags
&
4
)
if
(
mpImplRuler
->
nFlags
&
4
)
{
{
rIn
.
ReadInt16
(
nTCount
);
rIn
.
ReadInt16
(
nTCount
);
if
(
nTCount
)
const
size_t
nMaxPossibleRecords
=
rIn
.
remainingSize
()
/
(
2
*
sizeof
(
sal_uInt16
));
const
sal_uInt16
nTabCount
(
nTCount
);
bRecordOk
=
nTabCount
<=
nMaxPossibleRecords
;
if
(
nTCount
&&
bRecordOk
)
{
{
mpImplRuler
->
nTabCount
=
(
sal_uInt16
)
nT
Count
;
mpImplRuler
->
nTabCount
=
nTab
Count
;
mpImplRuler
->
pTab
=
new
PPTTabEntry
[
mpImplRuler
->
nTabCount
];
mpImplRuler
->
pTab
=
new
PPTTabEntry
[
mpImplRuler
->
nTabCount
];
for
(
i
=
0
;
i
<
nTCount
;
i
++
)
for
(
i
=
0
;
i
<
nTCount
;
i
++
)
{
{
...
@@ -4530,23 +4538,27 @@ PPTTextRulerInterpreter::PPTTextRulerInterpreter( sal_uInt32 nFileOfs, SdrPowerP
...
@@ -4530,23 +4538,27 @@ PPTTextRulerInterpreter::PPTTextRulerInterpreter( sal_uInt32 nFileOfs, SdrPowerP
}
}
}
}
}
}
for
(
i
=
0
;
i
<
5
;
i
++
)
if
(
bRecordOk
)
{
{
if
(
mpImplRuler
->
nFlags
&
(
8
<<
i
)
)
for
(
i
=
0
;
i
<
5
;
i
++
)
rIn
.
ReadUInt16
(
mpImplRuler
->
nTextOfs
[
i
]
);
if
(
mpImplRuler
->
nFlags
&
(
256
<<
i
)
)
rIn
.
ReadUInt16
(
mpImplRuler
->
nBulletOfs
[
i
]
);
if
(
mpImplRuler
->
nBulletOfs
[
i
]
>
0x7fff
)
{
{
// workaround
if
(
mpImplRuler
->
nFlags
&
(
8
<<
i
)
)
// when bullet offset is > 0x7fff, the paragraph should look like
rIn
.
ReadUInt16
(
mpImplRuler
->
nTextOfs
[
i
]
);
// * first line text
if
(
mpImplRuler
->
nFlags
&
(
256
<<
i
)
)
// second line text
rIn
.
ReadUInt16
(
mpImplRuler
->
nBulletOfs
[
i
]
);
if
(
mpImplRuler
->
nBulletOfs
[
i
]
>
0x7fff
)
// we add to bullet para indent 0xffff - bullet offset. it looks like
{
// best we can do for now
// workaround
mpImplRuler
->
nTextOfs
[
i
]
+=
0xffff
-
mpImplRuler
->
nBulletOfs
[
i
];
// when bullet offset is > 0x7fff, the paragraph should look like
mpImplRuler
->
nBulletOfs
[
i
]
=
0
;
// * first line text
// second line text
// we add to bullet para indent 0xffff - bullet offset. it looks like
// best we can do for now
mpImplRuler
->
nTextOfs
[
i
]
+=
0xffff
-
mpImplRuler
->
nBulletOfs
[
i
];
mpImplRuler
->
nBulletOfs
[
i
]
=
0
;
}
}
}
}
}
}
}
...
...
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