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
9de20d1e
Kaydet (Commit)
9de20d1e
authored
Nis 17, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add tests for CVE-2008-1097, etc.
Change-Id: Iad6948fdf6eb60f86d764783b72a4fe7f5642e40
üst
f31ac240
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
128 additions
and
17 deletions
+128
-17
CppunitTest_filter_pcx_test.mk
filter/CppunitTest_filter_pcx_test.mk
+41
-0
Module_filter.mk
filter/Module_filter.mk
+2
-1
.gitignore
filter/qa/cppunit/data/pcx/fail/.gitignore
+0
-0
CVE-2008-1097-1.pcx
filter/qa/cppunit/data/pcx/fail/CVE-2008-1097-1.pcx
+0
-0
.gitignore
filter/qa/cppunit/data/pcx/indeterminate/.gitignore
+1
-0
.gitignore
filter/qa/cppunit/data/pcx/pass/.gitignore
+0
-0
rhbz469075-1.pcx
filter/qa/cppunit/data/pcx/pass/rhbz469075-1.pcx
+0
-0
filters-pcx-test.cxx
filter/qa/cppunit/filters-pcx-test.cxx
+71
-0
ipcx.cxx
filter/source/graphicfilter/ipcx/ipcx.cxx
+5
-4
itiff.cxx
filter/source/graphicfilter/itiff/itiff.cxx
+8
-12
No files found.
filter/CppunitTest_filter_pcx_test.mk
0 → 100644
Dosyayı görüntüle @
9de20d1e
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_CppunitTest_CppunitTest,filter_pcx_test))
$(eval $(call gb_CppunitTest_use_external,filter_pcx_test,boost_headers))
$(eval $(call gb_CppunitTest_add_exception_objects,filter_pcx_test, \
filter/qa/cppunit/filters-pcx-test \
))
$(eval $(call gb_CppunitTest_use_libraries,filter_pcx_test, \
ipx \
sal \
test \
tl \
unotest \
vcl \
$(gb_UWINAPI) \
))
$(eval $(call gb_CppunitTest_use_api,filter_pcx_test,\
udkapi \
offapi \
))
$(eval $(call gb_CppunitTest_use_ure,filter_pcx_test))
$(eval $(call gb_CppunitTest_use_components,filter_pcx_test,\
configmgr/source/configmgr \
))
$(eval $(call gb_CppunitTest_use_configuration,filter_pcx_test))
# vim: set noet sw=4 ts=4:
filter/Module_filter.mk
Dosyayı görüntüle @
9de20d1e
...
@@ -83,10 +83,11 @@ $(eval $(call gb_Module_add_check_targets,filter,\
...
@@ -83,10 +83,11 @@ $(eval $(call gb_Module_add_check_targets,filter,\
ifneq ($(DISABLE_CVE_TESTS),TRUE)
ifneq ($(DISABLE_CVE_TESTS),TRUE)
$(eval $(call gb_Module_add_check_targets,filter,\
$(eval $(call gb_Module_add_check_targets,filter,\
CppunitTest_filter_pcx_test \
CppunitTest_filter_pict_test \
CppunitTest_filter_pict_test \
CppunitTest_filter_ras_test \
CppunitTest_filter_ras_test \
CppunitTest_filter_tga_test \
CppunitTest_filter_tiff_test \
CppunitTest_filter_tiff_test \
CppunitTest_filter_tga_test \
))
))
endif
endif
...
...
filter/qa/cppunit/data/pcx/fail/.gitignore
0 → 100644
Dosyayı görüntüle @
9de20d1e
filter/qa/cppunit/data/pcx/fail/CVE-2008-1097-1.pcx
0 → 100644
Dosyayı görüntüle @
9de20d1e
File added
filter/qa/cppunit/data/pcx/indeterminate/.gitignore
0 → 100644
Dosyayı görüntüle @
9de20d1e
*.wmf-*
filter/qa/cppunit/data/pcx/pass/.gitignore
0 → 100644
Dosyayı görüntüle @
9de20d1e
filter/qa/cppunit/data/pcx/pass/rhbz469075-1.pcx
0 → 100644
Dosyayı görüntüle @
9de20d1e
File added
filter/qa/cppunit/filters-pcx-test.cxx
0 → 100644
Dosyayı görüntüle @
9de20d1e
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <unotest/filters-test.hxx>
#include <test/bootstrapfixture.hxx>
#include <vcl/FilterConfigItem.hxx>
#include <tools/stream.hxx>
#include <vcl/graph.hxx>
#include <osl/file.hxx>
#include <osl/process.h>
extern
"C"
{
SAL_DLLPUBLIC_EXPORT
bool
SAL_CALL
GraphicImport
(
SvStream
&
rStream
,
Graphic
&
rGraphic
,
FilterConfigItem
*
);
}
using
namespace
::
com
::
sun
::
star
;
/* Implementation of Filters test */
class
RasFilterTest
:
public
test
::
FiltersTest
,
public
test
::
BootstrapFixture
{
public
:
RasFilterTest
()
:
BootstrapFixture
(
true
,
false
)
{}
virtual
bool
load
(
const
OUString
&
,
const
OUString
&
rURL
,
const
OUString
&
,
unsigned
int
,
unsigned
int
,
unsigned
int
)
SAL_OVERRIDE
;
/**
* Ensure CVEs remain unbroken
*/
void
testCVEs
();
CPPUNIT_TEST_SUITE
(
RasFilterTest
);
CPPUNIT_TEST
(
testCVEs
);
CPPUNIT_TEST_SUITE_END
();
};
bool
RasFilterTest
::
load
(
const
OUString
&
,
const
OUString
&
rURL
,
const
OUString
&
,
unsigned
int
,
unsigned
int
,
unsigned
int
)
{
SvFileStream
aFileStream
(
rURL
,
STREAM_READ
);
Graphic
aGraphic
;
return
GraphicImport
(
aFileStream
,
aGraphic
,
NULL
);
}
void
RasFilterTest
::
testCVEs
()
{
testDir
(
OUString
(),
getURLFromSrc
(
"/filter/qa/cppunit/data/pcx/"
),
OUString
());
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
RasFilterTest
);
CPPUNIT_PLUGIN_IMPLEMENT
();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
filter/source/graphicfilter/ipcx/ipcx.cxx
Dosyayı görüntüle @
9de20d1e
...
@@ -160,10 +160,7 @@ sal_Bool PCXReader::ReadPCX(Graphic & rGraphic)
...
@@ -160,10 +160,7 @@ sal_Bool PCXReader::ReadPCX(Graphic & rGraphic)
void
PCXReader
::
ImplReadHeader
()
void
PCXReader
::
ImplReadHeader
()
{
{
sal_uInt8
nbyte
;
sal_uInt8
nbyte
(
0
);
sal_uInt16
nushort
;
sal_uInt16
nMinX
,
nMinY
,
nMaxX
,
nMaxY
;
m_rPCX
.
ReadUChar
(
nbyte
).
ReadUChar
(
nVersion
).
ReadUChar
(
nEncoding
);
m_rPCX
.
ReadUChar
(
nbyte
).
ReadUChar
(
nVersion
).
ReadUChar
(
nEncoding
);
if
(
nbyte
!=
0x0a
||
(
nVersion
!=
0
&&
nVersion
!=
2
&&
nVersion
!=
3
&&
nVersion
!=
5
)
||
nEncoding
>
1
)
if
(
nbyte
!=
0x0a
||
(
nVersion
!=
0
&&
nVersion
!=
2
&&
nVersion
!=
3
&&
nVersion
!=
5
)
||
nEncoding
>
1
)
{
{
...
@@ -171,7 +168,9 @@ void PCXReader::ImplReadHeader()
...
@@ -171,7 +168,9 @@ void PCXReader::ImplReadHeader()
return
;
return
;
}
}
nbyte
=
0
;
m_rPCX
.
ReadUChar
(
nbyte
);
nBitsPerPlanePix
=
(
sal_uLong
)
nbyte
;
m_rPCX
.
ReadUChar
(
nbyte
);
nBitsPerPlanePix
=
(
sal_uLong
)
nbyte
;
sal_uInt16
nMinX
(
0
),
nMinY
(
0
),
nMaxX
(
0
),
nMaxY
(
0
);
m_rPCX
.
ReadUInt16
(
nMinX
).
ReadUInt16
(
nMinY
).
ReadUInt16
(
nMaxX
).
ReadUInt16
(
nMaxY
);
m_rPCX
.
ReadUInt16
(
nMinX
).
ReadUInt16
(
nMinY
).
ReadUInt16
(
nMaxX
).
ReadUInt16
(
nMaxY
);
if
((
nMinX
>
nMaxX
)
||
(
nMinY
>
nMaxY
))
if
((
nMinX
>
nMaxX
)
||
(
nMinY
>
nMaxY
))
...
@@ -191,7 +190,9 @@ void PCXReader::ImplReadHeader()
...
@@ -191,7 +190,9 @@ void PCXReader::ImplReadHeader()
ImplReadPalette
(
16
);
ImplReadPalette
(
16
);
m_rPCX
.
SeekRel
(
1
);
m_rPCX
.
SeekRel
(
1
);
nbyte
=
0
;
m_rPCX
.
ReadUChar
(
nbyte
);
nPlanes
=
(
sal_uLong
)
nbyte
;
m_rPCX
.
ReadUChar
(
nbyte
);
nPlanes
=
(
sal_uLong
)
nbyte
;
sal_uInt16
nushort
(
0
);
m_rPCX
.
ReadUInt16
(
nushort
);
nBytesPerPlaneLin
=
(
sal_uLong
)
nushort
;
m_rPCX
.
ReadUInt16
(
nushort
);
nBytesPerPlaneLin
=
(
sal_uLong
)
nushort
;
m_rPCX
.
ReadUInt16
(
nPaletteInfo
);
m_rPCX
.
ReadUInt16
(
nPaletteInfo
);
...
...
filter/source/graphicfilter/itiff/itiff.cxx
Dosyayı görüntüle @
9de20d1e
...
@@ -219,18 +219,16 @@ sal_uLong TIFFReader::DataTypeSize()
...
@@ -219,18 +219,16 @@ sal_uLong TIFFReader::DataTypeSize()
return
nSize
;
return
nSize
;
}
}
sal_uLong
TIFFReader
::
ReadIntData
()
sal_uLong
TIFFReader
::
ReadIntData
()
{
{
double
nDOUBLE
;
double
nDOUBLE
(
0.0
)
;
float
nFLOAT
;
float
nFLOAT
(
0
)
;
sal_uInt32
nUINT32a
,
nUINT32b
;
sal_uInt32
nUINT32a
(
0
),
nUINT32b
(
0
)
;
sal_Int32
nINT32
;
sal_Int32
nINT32
(
0
)
;
sal_uInt16
nUINT16
;
sal_uInt16
nUINT16
(
0
)
;
sal_Int16
nINT16
;
sal_Int16
nINT16
(
0
)
;
sal_uInt8
nBYTE
;
sal_uInt8
nBYTE
(
0
)
;
char
nCHAR
;
char
nCHAR
(
0
)
;
switch
(
nDataType
)
switch
(
nDataType
)
{
{
...
@@ -282,8 +280,6 @@ sal_uLong TIFFReader::ReadIntData()
...
@@ -282,8 +280,6 @@ sal_uLong TIFFReader::ReadIntData()
return
nUINT32a
;
return
nUINT32a
;
}
}
double
TIFFReader
::
ReadDoubleData
()
double
TIFFReader
::
ReadDoubleData
()
{
{
sal_uInt32
nulong
;
sal_uInt32
nulong
;
...
...
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