243 Commits (f3f66c56dba7670c48a8cd3e3f2030f4eb21601c)

Author SHA1 Message Date
Rosen Penev f3b572d211 fix iconv handling and windows
WIN32 as a define is wrong. _WIN32 is the correct one.

Which opens up the issue of the used functions and the wrong logic.
Changed the function logic to use if and elif, as done later in the
code.

Also changed all usages of WIN32 with _WIN32

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev b8855fb3b5 misc sonarlint cleanups
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse cc604780be
Merge pull request #2283 from kevinbackhouse/printStructure-depth
Convert type of depth parameter to size_t
3 years ago
Rosen Penev 1d0530f04d misc sonarlint changes
Mostly const changes.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse b0040e3bbe
Convert type of depth parameter to size_t. 3 years ago
Kevin Backhouse 0f1ea7571b
Refactor printTiffStructure depth increment 3 years ago
Kevin Backhouse 8e5b8113e7
Use emplace_back 3 years ago
Kevin Backhouse a608138f5f
Simplify the iptcDataSegs logic 3 years ago
Kevin Backhouse ad4e13b827
Change return type of BasicIo::tell() to size_t. 3 years ago
Rosen Penev b4c90b5e16 clang-tidy: replace pointer magic with data()
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más c9bdd6ed94
Merge pull request #2209 from Exiv2/mainTODOs
Improvements around TODO comments
3 years ago
Rosen Penev a86bc386da reference conversions
There's no nullptr here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más 2b74cc885d Revert some boilerplate which is not needed 3 years ago
Luis Díaz Más c3d0100d48 Fixing bad usages of DataBuf (when it is empty) 3 years ago
Luis Díaz Más 25c47cd1cf
Merge pull request #2197 from Exiv2/mainRefactoringFormats
Refactoring in JpegImage and Photoshop classes
3 years ago
Luis Díaz Más 4d99c2aca1 Use std::pair to return multiple values 3 years ago
Luis Díaz Más f942ba89bd Move Photoshopb class to internal namespace 3 years ago
Luis Diaz 047f6b733e Change logic to determine if segment has size
Note that the failing tests that had to be adapted were bad formed files
from FUZZERs. We should not consider invalid markers like 0x00 or 0x52
but only undefined APPn markers.
3 years ago
Luis Diaz 400632f27b Factor out function readSegmentSize() 3 years ago
Luis Diaz 24d2a7b8f0 JpegBase::markerHasLength moved to implementation details 3 years ago
Luis Diaz 23fe743d4d Move private constants to .cpp 3 years ago
Luis Diaz b00e460d76 Move static functions to anonymous namespace 3 years ago
Rosen Penev 0d971e98e4 remove some unique_ptrs
They're not really used as pointers.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev cacb54eaba use auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Diaz a505d6f06c More unit tests for Photoshop methods 3 years ago
Luis Diaz 8ab7800477 Remove 2nd param from Photoshop::isIrb() since it is always hardcoded 3 years ago
Luis Díaz Más e715243aa5 Fix integer overflow #2179 3 years ago
Rosen Penev c35fb7104b clang-tidy: use any_of
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev bad4712df8 static constexpr conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más ae4df71233 Remove DataBuf::copyBytes and use std::copy instead 3 years ago
Luis Díaz Más b05573fadc Remove most of the asserts from codebase 3 years ago
Luis Díaz Más 30bf563f4d Update .clang-format file & apply clang-format to whole project 3 years ago
Rosen Penev b2b6d834ba
some std::array conversions (#2148)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Diaz 7576a2757b More size_t for sizes 3 years ago
Luis Díaz Más 96f7f2e4c5 Convert Exiv2::ErrorCode into an enum class 3 years ago
Luis Díaz Más c115d4daf7
Merge pull request #2131 from Exiv2/mainCleanups
Include what you use + more SPDX identifiers + few other cleanups
3 years ago
Rosen Penev b8304fffa4 clang-tidy: don't use C casts
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más f894ee0568 Fix debug builds 3 years ago
Luis Díaz Más 8b1fe379a1 Removing unused headers thanks to IWYU 3 years ago
Rosen Penev 95355fe214 clang-tidy: remove C casts
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 8cda090e58 clang-tidy: get rid of compare() usage
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 6d1fa2ecea clang-tidy: use empty() instead of size()
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 04bacdedd6 clang-tidy: use auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev ae3e28c62a make array constexpr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más b17828b454
Use SPDX for licenses (#2122)
* Use SPDX identifier in header files

* Use SPDX identifier in rest of source files

* Fix usage of SPDX for files with 2 licenses

* Add global license file

* Fix compilation
3 years ago
Luis Díaz Más f6b17d2a4d Fix issues found by fuzzer 3 years ago
Luis Díaz Más b9f9d041ea Several transformations on DataBuf + migration to size_t
- Provide begin/end iterators to DataBuf and simplify code
- Adapt test output after last changes
- Replacing long by size_t in value.hpp
- Use size_t in some Photoshop functions
- Remove some static_casts
3 years ago
Luis Díaz Más 7dea0050b1 Factor out duplicated piece of code 3 years ago
Luis Díaz Más 615ccff5ab Fix another case revealed by tests 3 years ago
Luis Díaz Más 6e50714726 Replace c style arrays by std::array 3 years ago