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
76201c60
Kaydet (Commit)
76201c60
authored
Mar 02, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ofz: oom in reading hwp data
Change-Id: I1e4dc5f474b229d4d68d3fc34bc23c88767e5e50
üst
4730b23b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
hwpfile.cxx
hwpfilter/source/hwpfile.cxx
+16
-2
No files found.
hwpfilter/source/hwpfile.cxx
Dosyayı görüntüle @
76201c60
...
...
@@ -356,8 +356,22 @@ void HWPFile::TagsRead()
return
;
}
_hwpInfo
.
back_info
.
data
.
resize
(
_hwpInfo
.
back_info
.
size
);
ReadBlock
(
_hwpInfo
.
back_info
.
data
.
data
(),
_hwpInfo
.
back_info
.
size
);
//read potentially compressed data in blocks as its more
//likely large values are simply broken and we'll run out
//of data before we need to realloc
for
(
int
i
=
0
;
i
<
_hwpInfo
.
back_info
.
size
;
i
+=
SAL_MAX_UINT16
)
{
int
nOldSize
=
_hwpInfo
.
back_info
.
data
.
size
();
size_t
nBlock
=
std
::
min
<
int
>
(
SAL_MAX_UINT16
,
_hwpInfo
.
back_info
.
size
-
nOldSize
);
_hwpInfo
.
back_info
.
data
.
resize
(
nOldSize
+
nBlock
);
size_t
nReadBlock
=
ReadBlock
(
_hwpInfo
.
back_info
.
data
.
data
()
+
nOldSize
,
nBlock
);
if
(
nBlock
!=
nReadBlock
)
{
_hwpInfo
.
back_info
.
data
.
resize
(
nOldSize
+
nReadBlock
);
break
;
}
}
_hwpInfo
.
back_info
.
size
=
_hwpInfo
.
back_info
.
data
.
size
();
if
(
_hwpInfo
.
back_info
.
size
>
0
)
_hwpInfo
.
back_info
.
type
=
2
;
...
...
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