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
adfa89b5
Kaydet (Commit)
adfa89b5
authored
Tem 15, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
check stream state more often for failures
Change-Id: Ie45d858021c3123ec21829cbf4742cf30ce46665
üst
23a0fe78
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
CVE-2008-1097-1.ras
filter/qa/cppunit/data/ras/fail/CVE-2008-1097-1.ras
+0
-0
iras.cxx
filter/source/graphicfilter/iras/iras.cxx
+14
-10
No files found.
filter/qa/cppunit/data/ras/
pass
/CVE-2008-1097-1.ras
→
filter/qa/cppunit/data/ras/
fail
/CVE-2008-1097-1.ras
Dosyayı görüntüle @
adfa89b5
File moved
filter/source/graphicfilter/iras/iras.cxx
Dosyayı görüntüle @
adfa89b5
...
...
@@ -54,7 +54,7 @@ private:
bool
ImplReadBody
(
BitmapWriteAccess
*
pAcc
);
bool
ImplReadHeader
();
sal_uInt8
ImplGetByte
();
sal_uInt8
ImplGetByte
();
public
:
RASReader
(
SvStream
&
rRAS
);
...
...
@@ -174,13 +174,11 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
return
mbStatus
;
}
bool
RASReader
::
ImplReadHeader
()
{
m_rRAS
.
ReadInt32
(
mnWidth
).
ReadInt32
(
mnHeight
).
ReadInt32
(
mnDepth
).
ReadInt32
(
mnImageDatSize
).
ReadInt32
(
mnType
).
ReadInt32
(
mnColorMapType
).
ReadInt32
(
mnColorMapSize
);
if
(
mnWidth
<=
0
||
mnHeight
<=
0
||
mnImageDatSize
<=
0
)
if
(
mnWidth
<=
0
||
mnHeight
<=
0
||
mnImageDatSize
<=
0
||
!
m_rRAS
.
good
()
)
mbStatus
=
false
;
switch
(
mnDepth
)
...
...
@@ -222,7 +220,7 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
switch
(
mnDstBitsPerPix
)
{
case
1
:
for
(
y
=
0
;
y
<
mnHeight
;
y
++
)
for
(
y
=
0
;
y
<
mnHeight
&&
mbStatus
;
++
y
)
{
for
(
x
=
0
;
x
<
mnWidth
;
x
++
)
{
...
...
@@ -233,11 +231,13 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
nDat
>>
(
(
x
&
7
)
^
7
))
);
}
if
(
!
(
(
x
-
1
)
&
0x8
)
)
ImplGetByte
();
// WORD ALIGNMENT ???
if
(
!
m_rRAS
.
good
())
mbStatus
=
false
;
}
break
;
case
8
:
for
(
y
=
0
;
y
<
mnHeight
;
y
++
)
for
(
y
=
0
;
y
<
mnHeight
&&
mbStatus
;
++
y
)
{
for
(
x
=
0
;
x
<
mnWidth
;
x
++
)
{
...
...
@@ -245,6 +245,8 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
pAcc
->
SetPixelIndex
(
y
,
x
,
nDat
);
}
if
(
x
&
1
)
ImplGetByte
();
// WORD ALIGNMENT ???
if
(
!
m_rRAS
.
good
())
mbStatus
=
false
;
}
break
;
...
...
@@ -253,7 +255,7 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
{
case
24
:
for
(
y
=
0
;
y
<
mnHeight
;
y
++
)
for
(
y
=
0
;
y
<
mnHeight
&&
mbStatus
;
++
y
)
{
for
(
x
=
0
;
x
<
mnWidth
;
x
++
)
{
...
...
@@ -272,11 +274,13 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
pAcc
->
SetPixel
(
y
,
x
,
BitmapColor
(
nRed
,
nGreen
,
nBlue
)
);
}
if
(
x
&
1
)
ImplGetByte
();
// WORD ALIGNMENT ???
if
(
!
m_rRAS
.
good
())
mbStatus
=
false
;
}
break
;
case
32
:
for
(
y
=
0
;
y
<
mnHeight
;
y
++
)
for
(
y
=
0
;
y
<
mnHeight
&&
mbStatus
;
++
y
)
{
for
(
x
=
0
;
x
<
mnWidth
;
x
++
)
{
...
...
@@ -295,6 +299,8 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
}
pAcc
->
SetPixel
(
y
,
x
,
BitmapColor
(
nRed
,
nGreen
,
nBlue
)
);
}
if
(
!
m_rRAS
.
good
())
mbStatus
=
false
;
}
break
;
}
...
...
@@ -307,8 +313,6 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
return
mbStatus
;
}
sal_uInt8
RASReader
::
ImplGetByte
()
{
sal_uInt8
nRetVal
;
...
...
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