132 Commits (c86ae6acf597304db37246434ebc393d732c22c2)

Author SHA1 Message Date
Rosen Penev 498f4ce273 simplify loops
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev df91578250 clang-tidy: replace defines with enum
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 6fd143d6a4 sonarlint cleanups
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev c8c289613d remove EXIV2API from src
Already declared in include

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 3633f8d2c2 clang-tidy: remove const from data members
Found with cppcoreguidelines-avoid-const-or-ref-data-members

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 22b12012a6 more SonarLint cleanups
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev ca95edc6bd random fixes
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev e2bf207477 add various moves
More efficient

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 725875497b SonarLint cleanups 2 years ago
Rosen Penev 9f21b78311 add contains function
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 6a34d9e57d add missing member functions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 376638259d namespace enforce.hpp functions to Internal
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 34318260ea fix C++20 deprecation warning
Capturing this with = is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 842ef05ee6 return nullptr instead of reset
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev d6e1b90a23 avoid reassignment
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev d458bf2540 clang-tidy: apply to newly merged stuff
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Kevin Backhouse 2739d90073
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52767
Add wrapper class to automatically call BrotliDecoderDestroyInstance() on exit.
3 years ago
Miloš Komarčević 1f5bc3b8a5
Avoid buffer reallocation (#2392) 3 years ago
Miloš Komarčević a58e52ed70 Use safe add to prevent overflow
Co-authored-by: Kevin Backhouse <kevinbackhouse@github.com>

Use safe add to prevent overflow

Co-authored-by: Kevin Backhouse <kevinbackhouse@github.com>
3 years ago
Miloš Komarčević 9a6ee59421 Support brotli compressed boxes in JPEG XL 3 years ago
Miloš Komarčević ee698689b4 Exif start can be at any byte in payload, not word aligned 3 years ago
Peter a2cb06a28e
Fix/add exceptions for BMFF based files (#2364)
* Fix BmffImage::writeMetadata() error id/message

* Add exceptions setting Exif/IPTC/XMP in BMFF

* Add missing header for new functions
3 years ago
Kevin Backhouse 56249bb1a0 Use getULong to read unsigned numbers. 3 years ago
Christoph Hasse 393815ffb0 fix(video) filetype detection: handle video via quicktimevideo.cpp and other ftyp files in bmffimage 3 years ago
Christoph Hasse 30dbd13982 fix(video) bmffimage can not currently handle mp42 files so skip those 3 years ago
Rosen Penev 71dc04ebb1 misc sonarlint stuff
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 b0040e3bbe
Convert type of depth parameter to size_t. 3 years ago
Rosen Penev 9ca7f861cf remove string_view from headers
This should allow usage with C++11 projects. It's also wrong. The only
user of this assigns an std::string from a string_view, which is not
safe.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse 1ada360774 Fix some incorrect format specifiers. 3 years ago
Kevin Backhouse ad4e13b827
Change return type of BasicIo::tell() to size_t. 3 years ago
Miloš Komarčević e00422ae52 Account for header bytes for Exif and XMP boxes 3 years ago
Rosen Penev 48f848f5bb clang-tidy: remove const params in decls
Found with readability-avoid-const-params-in-decls

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más 941017d281
Fix issues on ARM builds (#2205)
* Specify base class initialization in Copy Constructor

* Fix printing of uint64_t variable in ARM 32bits

Use cinttypes

* Fix alignment issues on ARM 32 bits

* tests: add assertion with custom message
3 years ago
Rosen Penev b72e4b0e44 clang-tidy: use auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más d7f35e33f0 Remove useless static_casts 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
Luis Díaz Más 96f7f2e4c5 Convert Exiv2::ErrorCode into an enum class 3 years ago
Luis Díaz Más 2834fa5f05 Use [[maybe_unused]] 3 years ago
Rosen Penev 04bacdedd6 clang-tidy: use auto
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 e07c3771da Fix more 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 c5a9dfd9af
Merge pull request #2109 from Exiv2/main_StringView
Refactoring & cleanup
3 years ago
Luis Díaz Más 8b3da36f42 Improvements from code review 3 years ago
Kevin Backhouse 90aa007188
Convert type of pixelHeight/pixelWidth to platform-independent uint32_t. 3 years ago
Luis Díaz Más a6185d29c6 Image::setComment now takes string_view 3 years ago
Kevin Backhouse 256365830a
Replace Metadatum::toLong() with Metadatum::toInt64(). 3 years ago
Luis Díaz Más 0f03e77634 Simplify code around UniquePtr(s) & use make_unique over new 3 years ago