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
a1fab361
Kaydet (Commit)
a1fab361
authored
Agu 09, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
valgrind + bff: Integer divide by zero
Change-Id: I4c47d17a421f1c6d2d6cc29c7b92ec930bdf901f
üst
273ed07a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
9 deletions
+22
-9
itiff.cxx
filter/source/graphicfilter/itiff/itiff.cxx
+22
-9
No files found.
filter/source/graphicfilter/itiff/itiff.cxx
Dosyayı görüntüle @
a1fab361
...
...
@@ -176,6 +176,19 @@ public:
delete
pAlphaMask
;
}
sal_uLong
GetRowsPerStrip
()
const
{
//Rows Per Strip:
//
//(TIFF format only) The number of rows of pixels per strip to use for
//encoding the TIFF image. A value greater than zero specifies the
//number of rows per strip. A value of 0 sets the rows per strip equal
//to the image length, resulting in a single strip. A value of -1 (the
//default) sets the rows per strip equal to infinity, resulting in a
//single strip.
return
nRowsPerStrip
==
0
?
nImageLength
:
nRowsPerStrip
;
}
bool
ReadTIFF
(
SvStream
&
rTIFF
,
Graphic
&
rGraphic
);
};
...
...
@@ -539,10 +552,10 @@ bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent )
{
for
(
np
=
0
;
np
<
nPlanes
;
np
++
)
{
nStrip
=
ny
/
nRowsPerStrip
+
np
*
nStripsPerPlane
;
nStrip
=
ny
/
GetRowsPerStrip
()
+
np
*
nStripsPerPlane
;
if
(
nStrip
>=
nNumStripOffsets
)
return
false
;
pTIFF
->
Seek
(
pStripOffsets
[
nStrip
]
+
(
ny
%
nRowsPerStrip
)
*
nStripBytesPerRow
);
pTIFF
->
Seek
(
pStripOffsets
[
nStrip
]
+
(
ny
%
GetRowsPerStrip
()
)
*
nStripBytesPerRow
);
pTIFF
->
Read
(
pMap
[
np
],
nBytesPerRow
);
if
(
pTIFF
->
GetError
()
)
return
false
;
...
...
@@ -593,9 +606,9 @@ bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent )
{
for
(
np
=
0
;
np
<
nPlanes
;
np
++
)
{
if
(
ny
/
nRowsPerStrip
+
np
*
nStripsPerPlane
>
nStrip
)
if
(
ny
/
GetRowsPerStrip
()
+
np
*
nStripsPerPlane
>
nStrip
)
{
nStrip
=
ny
/
nRowsPerStrip
+
np
*
nStripsPerPlane
;
nStrip
=
ny
/
GetRowsPerStrip
()
+
np
*
nStripsPerPlane
;
if
(
nStrip
>=
nNumStripOffsets
)
return
false
;
pTIFF
->
Seek
(
pStripOffsets
[
nStrip
]
);
...
...
@@ -624,9 +637,9 @@ bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent )
{
for
(
np
=
0
;
np
<
nPlanes
;
np
++
)
{
if
(
ny
/
nRowsPerStrip
+
np
*
nStripsPerPlane
>
nStrip
)
if
(
ny
/
GetRowsPerStrip
()
+
np
*
nStripsPerPlane
>
nStrip
)
{
nStrip
=
ny
/
nRowsPerStrip
+
np
*
nStripsPerPlane
;
nStrip
=
ny
/
GetRowsPerStrip
()
+
np
*
nStripsPerPlane
;
if
(
nStrip
>=
nNumStripOffsets
)
return
false
;
pTIFF
->
Seek
(
pStripOffsets
[
nStrip
]);
...
...
@@ -652,9 +665,9 @@ bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent )
{
for
(
np
=
0
;
np
<
nPlanes
;
np
++
)
{
if
(
ny
/
nRowsPerStrip
+
np
*
nStripsPerPlane
>
nStrip
)
if
(
ny
/
GetRowsPerStrip
()
+
np
*
nStripsPerPlane
>
nStrip
)
{
nStrip
=
ny
/
nRowsPerStrip
+
np
*
nStripsPerPlane
;
nStrip
=
ny
/
GetRowsPerStrip
()
+
np
*
nStripsPerPlane
;
if
(
nStrip
>=
nNumStripOffsets
)
return
false
;
pTIFF
->
Seek
(
pStripOffsets
[
nStrip
]);
...
...
@@ -1310,7 +1323,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
if
(
(
nFillOrder
==
2
)
&&
(
nCompression
!=
5
)
)
// in the LZW mode bits are already being inverted
bByteSwap
=
true
;
nStripsPerPlane
=
(
nImageLength
-
1
)
/
nRowsPerStrip
+
1
;
nStripsPerPlane
=
(
nImageLength
-
1
)
/
GetRowsPerStrip
()
+
1
;
nBytesPerRow
=
(
nImageWidth
*
nSamplesPerPixel
/
nPlanes
*
nBitsPerSample
+
7
)
>>
3
;
for
(
sal_uLong
j
=
0
;
j
<
4
;
j
++
)
...
...
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