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
473efc7a
Kaydet (Commit)
473efc7a
authored
Mar 11, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ofz: test if comment data is available before alloc
Change-Id: I0d2cdae6a825fc74d08c55353f48f64021542be4
üst
1e8d0071
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
svmconverter.cxx
vcl/source/gdi/svmconverter.cxx
+11
-5
No files found.
vcl/source/gdi/svmconverter.cxx
Dosyayı görüntüle @
473efc7a
...
@@ -1404,21 +1404,27 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
...
@@ -1404,21 +1404,27 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case
GDI_COMMENT_COMMENT
:
case
GDI_COMMENT_COMMENT
:
{
{
sal_Int32
nValue
;
sal_uInt32
nDataSize
;
std
::
vector
<
sal_uInt8
>
aData
;
std
::
vector
<
sal_uInt8
>
aData
;
sal_Int32
nFollowingActionCount
;
OString
aComment
=
read_uInt16_lenPrefixed_uInt8s_ToOString
(
rIStm
);
OString
aComment
=
read_uInt16_lenPrefixed_uInt8s_ToOString
(
rIStm
);
rIStm
.
ReadInt32
(
nValue
).
ReadUInt32
(
nDataSize
);
sal_Int32
nValue
(
0
);
sal_uInt32
nDataSize
(
0
);
rIStm
.
ReadInt32
(
nValue
).
ReadUInt32
(
nDataSize
);
if
(
nDataSize
)
if
(
nDataSize
)
{
{
const
size_t
nMaxPossibleData
=
rIStm
.
remainingSize
();
if
(
nDataSize
>
nMaxPossibleActions
)
{
SAL_WARN
(
"vcl.gdi"
,
"svm record claims to have: "
<<
nDataSize
<<
" data, but only "
<<
nMaxPossibleData
<<
" possible"
);
nDataSize
=
nMaxPossibleActions
;
}
aData
.
resize
(
nDataSize
);
aData
.
resize
(
nDataSize
);
nDataSize
=
rIStm
.
ReadBytes
(
aData
.
data
(),
nDataSize
);
nDataSize
=
rIStm
.
ReadBytes
(
aData
.
data
(),
nDataSize
);
}
}
rIStm
.
ReadInt32
(
nFollowingActionCount
);
sal_Int32
nFollowingActionCount
(
0
);
rIStm
.
ReadInt32
(
nFollowingActionCount
);
ImplSkipActions
(
rIStm
,
nFollowingActionCount
);
ImplSkipActions
(
rIStm
,
nFollowingActionCount
);
rMtf
.
AddAction
(
new
MetaCommentAction
(
aComment
,
nValue
,
aData
.
data
(),
nDataSize
));
rMtf
.
AddAction
(
new
MetaCommentAction
(
aComment
,
nValue
,
aData
.
data
(),
nDataSize
));
...
...
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