Commit Graph

196 Commits

Author SHA1 Message Date
Kevin Backhouse
5bfa568b63
Add OSS-Fuzz status badge and CIFuzz integration. 2021-08-17 17:47:17 +01:00
Kevin Backhouse
cee9015ff8
Add special build mode for OSS-Fuzz. 2021-08-15 13:34:41 +01:00
Kevin Backhouse
64fe77673f
Decouple EXIV2_BUILD_FUZZ_TESTS from EXIV2_TEAM_USE_SANITIZERS. 2021-08-11 15:11:01 +01:00
Kevin Backhouse
ee3016c240
Merge pull request #1813 from kevinbackhouse/FuzzWithASAN
Add sanitizer flags when fuzzing
2021-08-08 11:58:52 +01:00
Kevin Backhouse
b6f9a3747f
Add sanitizer flags when fuzzing. 2021-08-08 11:18:56 +01:00
Kevin Backhouse
e667346582
Fix for https://github.com/Exiv2/exiv2/issues/1856 2021-08-07 16:59:19 +01:00
Christoph Hasse
2ca56ecbd0 refactor: remove leftover empty if statement 2021-07-25 20:58:06 +02:00
Christoph Hasse
969ffcc439 refactor: remove regex related cmake stuff 2021-07-25 20:58:06 +02:00
Christoph Hasse
d152c0c13c refactor: remove FindRegex.cmake 2021-07-25 20:58:06 +02:00
Kevin Backhouse
bf786f4cc6
Updates to make fuzzing work. 2021-07-11 21:14:08 +01:00
Jeka Pats
b2cdf2a535
Add libFuzzer integration + report bug
This commit places the basics for libFuzzer integration with one
fuzzer which fuzzes the readMetadata function. The fuzzer is
located at fuzz/read-metadata.

To add more fuzzers please add them to ./fuzz directory as
described in the README.

Also a memory corruption bug is found using this fuzzer which
might lead to additional bugs after fix is pushed.
2021-07-09 12:32:21 +01:00
Fabrice Fontaine
f31c0eba09 add BUILD_WITH_STACK_PROTECTOR option
Add BUILD_WITH_STACK_PROTECTOR to avoid the following build failure with
toolchains that don't support stack-protector:

/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mipsel-buildroot-linux-uclibc/9.3.0/../../../../mipsel-buildroot-linux-uclibc/bin/ld: utils.cpp:(.text._ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag[_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag]+0xd0): undefined reference to `__stack_chk_fail'

Indeed, support for -fstack-protector-strong can't be detected through
check_cxx_compiler_flag as some toolchains need to link with -lssp to
enable SSP support

Fixes:
 - http://autobuild.buildroot.org/results/ae4635899124c602c70d2b342a76f95c34aa4a3d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-07-01 19:44:40 +02:00
Robin Mills
fd2ab89de5 exifprint_lint 2021-06-23 14:24:46 +01:00
Attila Oláh
33419c8dd1
Fix compilation with -Wunused-variable
When compiling with -Wunused-variable, `EXT_STRERROR_R_CHAR_P` gets undefined because of a failing compilation check.

An alternative would be to mark `c` as `__attribute__((undefined))`, but MSVC doesn't have `__attribute__((undefined))`.
2021-06-14 12:41:47 +00:00
Luis Díaz Más
f30022d73d
Fix issues detected with PVS-Studio + other little improvements (#1689)
* avoid re-declaration of constant variables

* Replace pthreads critical section with std::mutex

* ci - better naming

* cmake - increase minimum version to 3.11. Use project DESCRIPTION

* fix - do not treat string::find() return type as bool

* remove conditions that were always true

* remove condition that were always false

* Remove EXV_HAVE_GMTIME_R which is not used anymore

* pixelWidth_ was inherited from Exiv2::Image

The width & height variables in the TiffImage class need to be mutable
to be able to change their values on the getters pixelHeight() and
pixelWidth() ... Do not ask me why ...

* Remove superfluous if

* pvs:V766 item with identical key added already

* pvs:V730 not all members were initialized (time)

* pvs:V730 not all members are initialized

* pvs:v668 no point in testing pointer against null after new

* pvs:V1048 variable assigned the same value

* replace c-style dynamic vector with std one

* pvs:547 fakeData is always true

* Remove useless constructor in derived class

* pvs:V690 modern way to disable copy-ctor

* Replace malloc/free with new/delete. No need to check for null

* pvs:V1028 cast operands and not result

* Remove custom MIN/MAX functions

* pvs:V595 pointer used before verified against null

* pvs: index used before being checked

* pvs:V1028 possible overflow. Cast operands

* pvs:v575 potential null pointer passed to other functions

* pvs:V547 deal with always true/false expressions

* pvs:V560 part of conditional expressions always false or true

* pvs:V701 possible break in realloc -> move to std::vector

* Make some classes 'final'

* Replace sprintf with std::to_string()

* fix compilation on windows
2021-06-01 12:39:10 +02:00
Luis Díaz Más
b54ade76ab Python3 dependency is not obligatory
Some of the CI-Linux-Distros jobs failed because of this. Python3 is not
available by default on Debian:9 nor in Centos:8.

Since we are not currently running the tests in those platforms, and
python3 is just used for testing, we do not want to enforce this project
dependency.
2021-05-18 14:39:17 +02:00
Luis Díaz Más
59a80eba2e mac - cmake_paths does not work directly on mac 2021-05-17 07:31:45 +02:00
Luis Díaz Más
08672dbea3 make win debug builds a bit faster 2021-05-17 07:31:45 +02:00
Luis Díaz Más
6c2141959a conan - change generator to be able to use latest expat version 2021-05-17 07:31:45 +02:00
Luis Díaz Más
64eb95a16f cmake: find python3 and use it in tests 2021-05-17 07:31:45 +02:00
Luis Diaz Mas
e87424b5e0 Add CTest support 2021-05-15 16:58:24 +02:00
Luis Diaz Mas
8035b7f320 cmake: Add target for obtaining local covarage reports 2021-05-14 22:38:30 +02:00
Luis Díaz Más
53f18cf408 conan: use cmake_paths generator instead of cmake
We also upgraded the xcode version on Travis-CI
2021-04-23 14:53:08 +02:00
Luis Díaz Más
c480be5814 cmake: disable -Wuseless-cast 2021-04-22 18:40:03 +02:00
Luis Díaz Más
75bf666d3b Remove typedef to Dictionary::const_iterator 2021-04-19 10:43:46 +02:00
Luis Díaz Más
6c0059b5a0 cmake: Treat xmpsdk headers as system ones
This is done so that when we use EXIV2_TEAM_EXTRA_WARNINGS we do not get
warnings about XMPSDK (we do not want to deal with those)
2021-04-18 18:49:58 +02:00
Luis Díaz Más
83dda6ccd7 Fix warnings related to -Wdeprecated-copy 2021-04-18 18:49:58 +02:00
Robin Mills
33d38dc472 Fix Cygwin64 to use -std=gnu++11 (instead of -std=c++11). MinGW/msys2 remains broken on CI. It's OK on my machine. 2021-04-18 09:44:51 +02:00
Luis Díaz Más
2f3989518a cmake: new toolchain file for MinGW cross-compilation on Ubuntu 2021-04-18 09:44:51 +02:00
Luis Díaz Más
2de3bad869 Remove EXIV2_ENABLE_VIDEO and related stuff 2021-04-18 09:44:51 +02:00
Luis Díaz Más
94b87a8dec Remove deprecated SSH support 2021-04-18 09:44:51 +02:00
Luis Díaz Más
cd5c8fba49 remove some cmake old checks + newer gtest version 2021-04-15 06:56:37 +02:00
Luis Díaz Más
0bbaa6eff3 cpp: Replace auto_ptr by unique_ptr 2021-04-15 06:56:11 +02:00
Miloš Komarčević
b92002b304 Match closing statement, doh 2021-03-19 16:14:27 +01:00
Miloš Komarčević
d49affaec5 Check for symlinks when uninstalling
Partly addresses #1501
2021-03-19 15:53:01 +01:00
Robin Mills
b975ad4cbb Push change in PR #1500. Thank you @kmilos. 2021-03-19 11:22:23 +00:00
Miloš Komarčević
e3c78623f7 Include HEIC type explicitly 2021-03-10 22:23:01 +01:00
Miloš Komarčević
0da1a50afe Revert style changes 2021-03-08 18:18:17 +01:00
Miloš Komarčević
e09d093ccf Minor whitespace formatting 2021-03-08 11:58:06 +01:00
Robin Mills
1b47e1e8f6 Fix linux/CI build breaker. 2021-02-24 12:15:21 +00:00
Robin Mills
ea968149f2 Fix linux/CI build breaker. 2021-02-24 11:55:59 +00:00
Peter Kovář
f0a321dedb [WIP] Base Media File Format 2021-02-16 10:10:00 +01:00
Peter Kovář
92469f4c27 [WIP] Add ISO/IEC Base Media File Format 2021-01-24 15:09:57 +01:00
Miloš Komarčević
8d06265470 Fix MinGW build for Ninja generator 2021-01-14 15:44:26 +01:00
Robin Mills
ec3d6faacf New profiles as documented in README-CONAN.md 2020-11-20 18:56:28 +00:00
Robin Mills
fded2da978 Documentation revision in response to #1394 2020-11-20 18:55:48 +00:00
Luis Díaz Más
30773c92a3 WIN32_LEAN_AND_MEAN propagated with exiv2lib target 2020-10-06 22:48:38 +02:00
Robin Mills
a82bcebaab fix_cygwin_stack_protection_0.27 2020-10-01 18:50:36 +01:00
Luis Díaz Más
f39b23806b Assume existence of stdint.h 2020-09-16 21:53:49 +02:00
Luis Diaz Mas
bfd0e0593b Use check_cxx_compiler_flags instead of C version 2020-09-16 11:53:11 +02:00