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
4cde204c
Kaydet (Commit)
4cde204c
authored
Mar 12, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ofz: pct oom, avoid allocation bitmap until after size checks are done
Change-Id: I12817adc50d45e2f08b3b5d4cb43daa527d274e9
üst
2a118816
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
ipict.cxx
filter/source/graphicfilter/ipict/ipict.cxx
+7
-8
No files found.
filter/source/graphicfilter/ipict/ipict.cxx
Dosyayı görüntüle @
4cde204c
...
...
@@ -703,8 +703,9 @@ sal_uLong PictReader::ReadAndDrawText()
namespace
{
BitmapWriteAccess
*
initBitmap
(
Bitmap
&
rBitmap
,
const
BitmapPalette
&
rPalette
)
BitmapWriteAccess
*
initBitmap
(
Bitmap
&
rBitmap
,
sal_uInt16
nWidth
,
sal_uInt16
nHeight
,
sal_uInt16
nDstBitCount
,
const
BitmapPalette
&
rPalette
)
{
rBitmap
=
Bitmap
(
Size
(
nWidth
,
nHeight
),
nDstBitCount
);
BitmapWriteAccess
*
pAcc
=
rBitmap
.
AcquireWriteAccess
();
if
(
!
pAcc
)
return
nullptr
;
...
...
@@ -757,7 +758,6 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
nDstBitCount
=
24
;
else
if
(
nDstBitCount
==
2
)
nDstBitCount
=
4
;
aBitmap
=
Bitmap
(
Size
(
nWidth
,
nHeight
),
nDstBitCount
);
if
(
bColorTable
)
{
...
...
@@ -788,7 +788,6 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
nRowBytes
&=
0x3fff
;
nPixelSize
=
nCmpCount
=
nCmpSize
=
1
;
nDataSize
+=
10
;
aBitmap
=
Bitmap
(
Size
(
nWidth
,
nHeight
),
nDstBitCount
);
aPalette
=
BitmapPalette
(
2
);
aPalette
[
0
]
=
BitmapColor
(
0xff
,
0xff
,
0xff
);
aPalette
[
1
]
=
BitmapColor
(
0
,
0
,
0
);
...
...
@@ -857,7 +856,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
return
0xffffffff
;
}
if
(
(
pAcc
=
initBitmap
(
aBitmap
,
aPalette
)
)
==
nullptr
)
if
(
(
pAcc
=
initBitmap
(
aBitmap
,
nWidth
,
nHeight
,
nDstBitCount
,
aPalette
)
)
==
nullptr
)
return
0xffffffff
;
for
(
sal_uInt16
ny
=
0
;
ny
<
nHeight
;
++
ny
)
...
...
@@ -940,7 +939,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
return
0xffffffff
;
}
if
(
(
pAcc
=
initBitmap
(
aBitmap
,
aPalette
)
)
==
nullptr
)
if
(
(
pAcc
=
initBitmap
(
aBitmap
,
nWidth
,
nHeight
,
nDstBitCount
,
aPalette
)
)
==
nullptr
)
return
0xffffffff
;
for
(
sal_uInt16
ny
=
0
;
ny
<
nHeight
;
++
ny
)
...
...
@@ -1037,7 +1036,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
if
(
nWidth
>
nMaxCols
)
return
0xffffffff
;
if
(
(
pAcc
=
initBitmap
(
aBitmap
,
aPalette
)
)
==
nullptr
)
if
(
(
pAcc
=
initBitmap
(
aBitmap
,
nWidth
,
nHeight
,
nDstBitCount
,
aPalette
)
)
==
nullptr
)
return
0xffffffff
;
for
(
sal_uInt16
ny
=
0
;
ny
<
nHeight
;
++
ny
)
...
...
@@ -1061,7 +1060,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
if
(
nWidth
>
nMaxCols
)
return
0xffffffff
;
if
(
(
pAcc
=
initBitmap
(
aBitmap
,
aPalette
)
)
==
nullptr
)
if
(
(
pAcc
=
initBitmap
(
aBitmap
,
nWidth
,
nHeight
,
nDstBitCount
,
aPalette
)
)
==
nullptr
)
return
0xffffffff
;
for
(
sal_uInt16
ny
=
0
;
ny
<
nHeight
;
++
ny
)
...
...
@@ -1084,7 +1083,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
if
(
nHeight
>
pPict
->
remainingSize
()
/
nByteCountSize
)
return
0xffffffff
;
if
(
(
pAcc
=
initBitmap
(
aBitmap
,
aPalette
)
)
==
nullptr
)
if
(
(
pAcc
=
initBitmap
(
aBitmap
,
nWidth
,
nHeight
,
nDstBitCount
,
aPalette
)
)
==
nullptr
)
return
0xffffffff
;
std
::
unique_ptr
<
sal_uInt8
[]
>
pScanline
(
new
sal_uInt8
[
static_cast
<
size_t
>
(
nWidth
)
*
nCmpCount
]);
...
...
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