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
c02e7987
Kaydet (Commit)
c02e7987
authored
Tem 20, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ensure loop ends eventually
Change-Id: I318385286fcc27ffb2d938237d83e793564d2525
üst
ff3a3bfd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
17 deletions
+22
-17
hang-6.tiff
filter/qa/cppunit/data/tiff/fail/hang-6.tiff
+0
-0
ccidecom.cxx
filter/source/graphicfilter/itiff/ccidecom.cxx
+22
-17
No files found.
filter/qa/cppunit/data/tiff/fail/hang-6.tiff
0 → 100644
Dosyayı görüntüle @
c02e7987
259 Bytes
filter/source/graphicfilter/itiff/ccidecom.cxx
Dosyayı görüntüle @
c02e7987
...
...
@@ -886,36 +886,41 @@ void CCIDecompressor::FillBits(sal_uInt8 * pTarget, sal_uInt16 nTargetBits,
}
}
sal_uInt16
CCIDecompressor
::
CountBits
(
const
sal_uInt8
*
pData
,
sal_uInt16
nDataSizeBits
,
sal_uInt16
nBitPos
,
sal_uInt8
nBlackOrWhite
)
{
sal_uInt16
nPos
,
nLo
;
sal_uInt8
nData
;
// here the number of bits belonging together is being counted
// which all have the color nBlackOrWhite (0xff oder 0x00)
// from the position nBitPos on
nPos
=
nBitPos
;
for
(;;)
{
if
(
nPos
>=
nDataSizeBits
)
{
sal_uInt16
nPos
=
nBitPos
;
for
(;;)
{
if
(
nPos
>=
nDataSizeBits
)
{
nPos
=
nDataSizeBits
;
break
;
}
nData
=
pData
[
nPos
>>
3
];
nLo
=
nPos
&
7
;
if
(
nLo
==
0
&&
nData
==
nBlackOrWhite
)
nPos
+=
8
;
else
{
if
(
((
nData
^
nBlackOrWhite
)
&
(
0x80
>>
nLo
))
!=
0
)
break
;
nPos
++
;
sal_uInt8
nData
=
pData
[
nPos
>>
3
];
sal_uInt16
nLo
=
nPos
&
7
;
if
(
nLo
==
0
&&
nData
==
nBlackOrWhite
)
{
//fail on overflow attempt
if
(
nPos
>
SAL_MAX_UINT16
-
8
)
return
0
;
nPos
+=
8
;
}
else
{
if
(
((
nData
^
nBlackOrWhite
)
&
(
0x80
>>
nLo
))
!=
0
)
break
;
++
nPos
;
}
}
if
(
nPos
<=
nBitPos
)
return
0
;
else
return
nPos
-
nBitPos
;
if
(
nPos
<=
nBitPos
)
return
0
;
return
nPos
-
nBitPos
;
}
void
CCIDecompressor
::
Read1DScanlineData
(
sal_uInt8
*
pTarget
,
sal_uInt16
nTargetBits
)
{
sal_uInt16
nCode
,
nCodeBits
,
nDataBits
,
nTgtFreeByteBits
;
...
...
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