170 Commits (aec6733df98bd37ee0885b61965cba587560ae26)

Author SHA1 Message Date
Kevin Backhouse c9d0cf3643
Make fields of DataBuf private. 4 years ago
Christoph Hasse d6c82b88bc refactor: avoid unused variable warning of regex_error 4 years ago
Christoph Hasse 687b38a130 refactor: use POSIX regex syntax as that is what was used before 4 years ago
Christoph Hasse d82980b563 refactor: replace old linux regex.h with regex from STL. 4 years ago
Kevin Backhouse 944e68fa15
Merge pull request #1787 from Exiv2/mergify/bp/main/pr-1766
Extra checking to prevent loop counter from wrapping around (backport #1766)
4 years ago
Kevin Backhouse 67a46f742d
Type of escapeStart should be size_t. 4 years ago
Kevin Backhouse 69d82ffe01
Defensive coding changes to avoid integer overflow in loop conditions. 4 years ago
Kevin Backhouse dc2c77ce81
Safer std::vector indexing. 4 years ago
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
4 years ago
Rosen Penev 2c57f214c5 clang-tidy: use nullptr
Found with modernize-use-nullptr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 743da1a564 clang-tidy: use C++ casting
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev ff39473c18 clang-tidy: convert to static
Found with readability-convert-member-functions-to-static

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev b8712188bb clang-tidy: use auto
Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 1b9b77c51f clang-tidy: add ending namespace comments
Found with google-readability-namespace-comments

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 9642e3cceb clang-tidy: remove pointless string init
Found with readability-redundant-string-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 143a1fbbe2 clang-tidy: don't use string compare
Found with readability-string-compare

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 8337462032 clang-tidy: use empty() instead of comparing size
Found with readability-container-size-empty

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev 5a9c29303e clang-tidy: remove pointless static
Found with readability-static-definition-in-anonymous-namespace

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev bd6a996181 clang-tidy: use using
Found with modernize-use-using

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Luis Díaz Más 1b4577904b Fix MSVC build 4 years ago
Rosen Penev 4ceb325c8f clang-tidy: range for loop conversions
Found with modernize-loop-convert

Ran through git clang-format.

Also removed several questionable loops and replaced with simpler
algorithms.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Luis Díaz Más de4d43d4d1 Fix warnings EXIV2_TEAM_EXTRA_WARNINGS
Most of the warnings fixed were:
- Hiding of local variables
- Hiding of globals
- Useless casts
- Conversions between float/double
4 years ago
Luis Díaz Más 5fcea2b4e2 Use stack variables instead of java style 4 years ago
Luis Díaz Más 0bbaa6eff3 cpp: Replace auto_ptr by unique_ptr 4 years ago
Robin Mills 9da2aed5d2 Use the documented 5 line prolog in every sample application. Tidy up sample prologs and header code. 4 years ago
Robin Mills d632988bbd Massive code prolog cleanup. 4 years ago
clanmills b983a9db75 Re-awaken obsolete command-line argument --binary and store class Task. 4 years ago
Peter Kovář f0a321dedb [WIP] Base Media File Format 4 years ago
Peter Kovář 92469f4c27 [WIP] Add ISO/IEC Base Media File Format 4 years ago
Jan Tojnar 48f2c9dbba
cmake: Fix paths with absolute GNUInstallDirs
It is not generally true that `CMAKE_INSTALL_<dir>` variables are relative paths:

https://github.com/jtojnar/cmake-snips#concatenating-paths-when-building-pkg-config-files
https://github.com/jtojnar/cmake-snips#assuming-cmake_install_dir-is-relative-path

Let's join them properly as paths, not strings.

On Windows, the absolute paths will likely remain unsupported as neither the CMake function,
nor the C++ code is able to detect absolute paths.

Signed-off-by: Jan Tojnar <jtojnar@gmail.com>
5 years ago
clanmills 904fa19d1c Code changes 5 years ago
clanmills 82087b58e4 fix_1099_0.27 5 years ago
Robin Mills 7844b11e4b
[xmpsdk] Add XMP Initialisation/Cleanup code to all main() programs
- update documentation
- Removed redundant calls to Exiv2::XmpParser::terminate() (legacy of our
  discusssion with @tester0077).
- this fixes #976
6 years ago
Luis Díaz Más 34e411d2fc Fix 547: option -pR only available in Debug mode.
Note that the method Params::evalPrint() has been clang-formatted.
7 years ago
Robin Mills 8a6cd5d24e Fix -vVg loops 7 years ago
Luis Díaz Más d1c2e2f64f bindtextdomain point to relative path to bin directory 7 years ago
Robin Mills 5f6ef65695 Update PROJECT_VERSION & add install() commands for CPack
- Version updated to 0.27.0.1.
- Release notes for MacOS-X Package, Linux, CYGWIN, win64 and msvc
- Redmine Release Notes Updated.
7 years ago
Luis Díaz Más c43d998457 Fix cppcheck issues: passedByValue 7 years ago
Luis Díaz Más e5bcabd026 Do not print hexadecimal version value when running exiv2 --version 7 years ago
Luis Díaz Más 603692a1d8 Copyright to Exiv2 authors 7 years ago
Luis Díaz Más 0bfa0168df Cleanup some of the PACKAGE_XXX variables and rely in the ones given by the project() command 7 years ago
Dan Čermák 1e23238fa4 Fix memory leak in Params::getopt() 7 years ago
clanmills 3c42fdddeb Fix include <exiv2/exiv2.hpp> to include exiv2/config.h (and consequential changes)
Fix cltest.cpp and version.cpp to report MSVC 2017 in which _MSC_VER == 1910
7 years ago
Luis Diaz Mas 6e244f31d3 Cleanup fallthrough warning + clang-format parseCommonTargets function 7 years ago
Dan Čermák f4e8ed2fd4 Catch all exceptions not caught in exiv2 cli-tool
It effectively looks the same as before, only now we don't call abort() but
instead clean up everything gracefully.
7 years ago
Dan Čermák 4b24e011dc Free potentially allocated regexes from Params::evalGrep
In Params::evalGrep regcomp allocates some internal space for the regex objects,
which must be freed manually via regfree(). This was however only done when the
call to regcomp() failed and not on success. As the regexes are needed later,
they have to be deallocated by the destructor.
7 years ago
Dan Čermák efe2ccdcb6 Replaced all hardcoded error codes with ker... constants 7 years ago
tbeu 5b5987a596 Remove obsolete EXIV2_RCSID 8 years ago
tbeu 5df8b01b77 Remove obsolete svn revision 8 years ago
Luis Díaz Más 5b8894908b Remove all references to EXV_HAVE_REGEX and related code 8 years ago