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
b02f1c58
Kaydet (Commit)
b02f1c58
authored
Eyl 10, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix size check related hang
Change-Id: I3e8aa5c48ba802cd363688502b44e27bfdf67f01
üst
78095389
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
hang-1.psd
filter/qa/cppunit/data/psd/pass/hang-1.psd
+0
-0
ipsd.cxx
filter/source/graphicfilter/ipsd/ipsd.cxx
+10
-9
No files found.
filter/qa/cppunit/data/psd/pass/hang-1.psd
0 → 100644
Dosyayı görüntüle @
b02f1c58
File added
filter/source/graphicfilter/ipsd/ipsd.cxx
Dosyayı görüntüle @
b02f1c58
...
...
@@ -172,9 +172,6 @@ bool PSDReader::ReadPSD(Graphic & rGraphic )
bool
PSDReader
::
ImplReadHeader
()
{
sal_uInt16
nCompression
;
sal_uInt32
nColorLength
,
nResourceLength
,
nLayerMaskLength
;
mpFileHeader
=
new
PSDFileHeader
;
m_rPSD
.
ReadUInt32
(
mpFileHeader
->
nSignature
).
ReadUInt16
(
mpFileHeader
->
nVersion
).
ReadUInt32
(
mpFileHeader
->
nPad1
).
ReadUInt16
(
mpFileHeader
->
nPad2
).
ReadUInt16
(
mpFileHeader
->
nChannels
).
ReadUInt32
(
mpFileHeader
->
nRows
).
ReadUInt32
(
mpFileHeader
->
nColumns
).
ReadUInt16
(
mpFileHeader
->
nDepth
).
ReadUInt16
(
mpFileHeader
->
nMode
);
...
...
@@ -194,6 +191,7 @@ bool PSDReader::ImplReadHeader()
mnDestBitDepth
=
(
nDepth
==
16
)
?
8
:
nDepth
;
sal_uInt32
nColorLength
(
0
);
m_rPSD
.
ReadUInt32
(
nColorLength
);
if
(
mpFileHeader
->
nMode
==
PSD_CMYK
)
{
...
...
@@ -270,7 +268,10 @@ bool PSDReader::ImplReadHeader()
default
:
return
false
;
}
m_rPSD
.
ReadUInt32
(
nResourceLength
);
sal_uInt32
nResourceLength
(
0
);
m_rPSD
.
ReadUInt32
(
nResourceLength
);
if
(
nResourceLength
>
m_rPSD
.
remainingSize
())
return
false
;
sal_uInt32
nLayerPos
=
m_rPSD
.
Tell
()
+
nResourceLength
;
// this is a loop over the resource entries to get the resolution info
...
...
@@ -291,8 +292,8 @@ bool PSDReader::ImplReadHeader()
if
(
nResEntryLen
&
1
)
nResEntryLen
++
;
// the resource entries are padded
sal_uInt32
nCurrentPos
=
m_rPSD
.
Tell
();
if
(
(
nResEntryLen
+
nCurrentPos
)
>
nLayerPos
)
// check if size
break
;
// is possible
if
(
nResEntryLen
>
(
nLayerPos
-
nCurrentPos
)
)
// check if size
break
;
// is possible
switch
(
nUniqueID
)
{
case
0x3ed
:
// UID for the resolution info
...
...
@@ -307,10 +308,12 @@ bool PSDReader::ImplReadHeader()
m_rPSD
.
Seek
(
nCurrentPos
+
nResEntryLen
);
// set the stream to the next
}
// resource entry
m_rPSD
.
Seek
(
nLayerPos
);
sal_uInt32
nLayerMaskLength
(
0
);
m_rPSD
.
ReadUInt32
(
nLayerMaskLength
);
m_rPSD
.
SeekRel
(
nLayerMaskLength
);
m_rPSD
.
ReadUInt16
(
nCompression
);
sal_uInt16
nCompression
(
0
);
m_rPSD
.
ReadUInt16
(
nCompression
);
if
(
nCompression
==
0
)
{
mbCompression
=
false
;
...
...
@@ -326,8 +329,6 @@ bool PSDReader::ImplReadHeader()
return
true
;
}
bool
PSDReader
::
ImplReadBody
()
{
sal_uLong
nX
,
nY
;
...
...
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