4129 Commits (dd445e6c8df9389f0ce49f2913a28e828f092dea)

Author SHA1 Message Date
Miloš Komarčević eada606992 Match Conan's cmake find module case for Brotli 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
Kevin Backhouse 62705a6615
Use Safe::add() in tiffvisitor_int.cpp 3 years ago
Peter 9767e375af
Update makernote model ID tags (#2389)
* Update `Exif.Sony(1|2).SonyModelID` values

* Update `Exif.Pentax.ModelID` values

* Update `Exif.Canon.ModelID` values

* Purge duplicates in `Exif.Canon.ModelID`

* Correct text in `Exif.Canon.ModelID`
3 years ago
Kevin Backhouse 3897f17b1e Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52355
Avoid integer overflow when temp == INT_MIN.
3 years ago
Kevin Backhouse 03abb2c109
Merge pull request #2384 from kevinbackhouse/fix-issue-2383
Avoid null pointer deref
3 years ago
Kevin Backhouse 222c45c154
Merge pull request #2374 from norbertwg/update_easyAccessAPI
several keys added to easyaccess
3 years ago
Kevin Backhouse 6bb956ad80
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52382
Avoid null pointer deref.
3 years ago
Kevin Backhouse b90426dda9
Merge pull request #2378 from kevinbackhouse/fix-issue-2376-2377
Fix bugs in QuickTimeVideo::userDataDecoder
3 years ago
Kevin Backhouse 597e372b1c
clang-format 3 years ago
Kevin Backhouse 459910c36a
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51751
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52053
Avoid null pointer deref and heap buffer overflow.
3 years ago
Rosen Penev fd7566fcd8 get rid of nested if conditions
Easier to read with lambdas.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
norbertwg e38d3d9976 several keys added to easyaccess
sample easyaccess-test enhanced with additional optional arguments
"category" for easier definition of some tests
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 a8a35345c8 Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51241
Fix bounds checking bug.
3 years ago
Kevin Backhouse b3bd36c749 clang-format 3 years ago
Kevin Backhouse 0db460c9b0 nul-terminate string 3 years ago
Kevin Backhouse a38e124076 Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51707
Resize buf to avoid buffer overflow.
3 years ago
Rosen Penev d856ca7d82 cland-tidy: simplify booleans
Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Peter 9dc34ad39c
Update Sony(1|2) tags (#2323)
* Update Sony(1|2) group (minor Minolta changes)

Transcribe all tags (except for `LensID`) from main ExifTool Sony
group into Exiv2.
Changes include:
- Rename `ColorReproduction` -> `CreativeStyle` and
  `LongExposureNoiseReduction` -> `FocusMode3` to reflect use.
- Rename `0x*` tagnames to equivalent ExifTool tags (e.g.,
  `0x2006` -> `Sharpness`).
- Remove tag entries that are Groups (e.g., `ShotInfo`).
- Separate some common Sony/Minolta data as the camera types use
  different values (e.g., `Quality`)
- Additional `exiv2-Sony*.exv` test files come from ExifTool Sony
  samples (https://exiftool.org/Sony.tar.gz).

ExifTool Sony tags sources:
https://www.exiftool.org/TagNames/Sony.html
1e17485cbb/lib/Image/ExifTool/Sony.pm

* Improve coverage of `Sony(1|2)` group

* Fix clang compilation on macOS

* Fix github-code-scanning warnings

* Fix minor `Exif.Sony(1|2)` problems

* Fix tests and update `Sony(1|2)` group coverage

* Fix testing

* Minor fixes and regenerate Regression data

* Update Sony tags with `getModel()`

Make finding the Sony model more resilient by also using
`SonyModelID`.

* Fix `Exif.Sony(1|2).AFPointsUsed` type

* Improve `Exif.Sony(1|2).*` coverage

* Fix types in Sony func `getFocusMode()`

* Update Regression tests for `Sony(1|2)`

* Minor fixes to `Sony(1|2)` tags

* Update `Sony(1|2)` tag coverage

* Improve `Sony(1|2)` tag coverage

* Update easyaccess with `Exif.Sony(1|2)` tags

* Update `SonyModelID` array comment

* Add Sony `LensSpec` tag to easyaccess

* Update `Sony(1|2)` label/descriptions

* Update `int` to `size_t` (credit:@kevinbackhouse)

* Fix Windows build warning in `src/tags_int.hpp`
3 years ago
Rosen Penev 84f566b4b7 use reference to work around MSVC bug
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse 640b0fbf5d
Merge pull request #2346 from kevinbackhouse/fix-issue-2345
Fix buffer overflow in QuickTimeVideo::tagDecoder
3 years ago
Kevin Backhouse 56249bb1a0 Use getULong to read unsigned numbers. 3 years ago
Kevin Backhouse d2253c91f5
Merge pull request #2348 from kevinbackhouse/fix-issue-2270
Don't allow zero width/height in WebPImage::inject_VP8X
3 years ago
Kevin Backhouse bf151a17a3
Don't allow zero width/height in WebPImage::inject_VP8X 3 years ago
Kevin Backhouse 344764a7de
Fix clang-format error. 3 years ago
Kevin Backhouse bf4f28b727
Avoid potential integer overflow. 3 years ago
Kevin Backhouse d3651fdbd3
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50901
Resize buf to avoid buffer overflow.
3 years ago
Christoph Hasse 337fe1854f fix(quicktimevideo) avoid out of bounds read, closes #2340 3 years ago
Kevin Backhouse 7a92e1bd0f Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50315
Don't allow INT_MIN (0x80000000) because it can cause a UBSAN failure in std::gcd().
3 years ago
Peter ccebe7936e
Update Nikon flash tags (#2274) 3 years ago
Christoph Hasse e4adf388aa fix(quicktimevideo) cleanup and hardening as suggested in review by @kevinbackhouse 3 years ago
Christoph Hasse 0577057548 fix(quicktimevideo) silence windows warnings 3 years ago
Christoph Hasse ce4b9f0ff9 fix(video) dont throw in isQTimeType 3 years ago
Christoph Hasse 3456f30988 fix(video) clang-format quicktimevideo 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 0a948c6a7d feat(video) revive quicktime.{h,cpp} and adapt to codebase changes. 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 89d7798f1d Add more MIME type mappings for TIFF-based raws
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 2fa84f4bab remove using
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 235b1e0d19 move structured bindings up
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 88fcd234bb remove pointless x_default variable
Just replace it with the string.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev b6c2062fae std::to_string conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 10a62b2350 replace custom gcd function with std
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse 3ac7608282
Merge pull request #2321 from kevinbackhouse/fix-issue-2320
Fix integer overflow in printDegrees
3 years ago
Rosen Penev e151daa0fc fix compilation without mmap and non win32
buf was refactored not to be a pointer.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse fe4f56d979
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49894
Check that `60 * rem` won't overflow.
3 years ago
Rosen Penev fc840405cc revert std::function back to function pointers
The former has too much overhead. No point in it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 9aaeb893ee don't use w32 sockets for cygwin
Not needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 350541f22a manual replacement of [0] with front()
Avoids implicit array decay.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 5c90684441 simplify some defines
As far as I can tell, _WIN32 is defined for true Windows platforms.
Cygwin is a POSIX platform.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
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 e41dd1d227 remove pointless UNUSED statement
Does not compile as it is no longer present.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 2b8ca5a9d7 fix compilation with mingw iconv
The parameter there is const. Use the appropriate macro.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Miloš Komarčević 7fa6d7378f Add Nikon3.WhiteBalanceBias2 3 years ago
Rosen Penev 306424f589 remove c_str for fs stuff
fs::path is convertable to a string.

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
Rosen Penev 1602afef0a const conversions
These were not const.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 5e20467e5c default init static variable
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev d4f04296e4 remove explicit constructor
No need.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev c64ed25c13 remove unused using
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 7b9ba51c4e enum class conversion
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 6e3db99755 simplify switch statement with returns
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse 2e8ce712ec Use emplace(). 3 years ago
Kevin Backhouse 166b5b834d Replace TiffTreeStruct with std::pair 3 years ago
Kevin Backhouse 3d38e11300 Remove unneeded constructor 3 years ago
Kevin Backhouse 67270c2b11 Use std::unordered_map for TiffTreeStruct lookup. 3 years ago
Kevin Backhouse be1c00c916 Suggestions from @neheb and @piponazo 3 years ago
Kevin Backhouse 71dfff5a69 Use a switch 3 years ago
Kevin Backhouse 7ec15d247e Use std::unordered_set for tiffImageTags 3 years ago
Rosen Penev 12b94bc420 get rid of extern const
Looks like some pre C++11 thing.

Also fix formatting of these by adding , at the end of the arrays.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse e831219d5c Correct error from #2301 3 years ago
Rosen Penev 938964f4d0 remove GroupName struct
No point in this.

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
Kevin Backhouse 09f61bc3d1 Suggestions from @neheb and @piponazo. 3 years ago
Kevin Backhouse 1fccceeba1 Use std::map for faster lookup. 3 years ago
Rosen Penev e74feff4d8 strcmp to == conversions
Does the same thing.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev d5e42da39e replace structs with std::pair
Simpler.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más 0256775408
Merge pull request #1949 from VJSchneid/main
add support for more fujifilm tags
3 years ago
Kevin Backhouse ee5dae4ddd Fix implicit cast warning. 3 years ago
Kevin Backhouse 4410f46214 Change the return type of the 2Data functions to size_t. 3 years ago
Viktor Schneider d62220a858 apply clang-format to src/fujimn_int.cpp 3 years ago
Viktor Schneider 73a1a0ec21 Merge remote-tracking branch 'origin' 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 8ba9003f19 Fix clang-tidy warning about double move. 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 46f2ef8009
Refactor printIFDStructure depth increment 3 years ago
Kevin Backhouse 39239cef68
Merge pull request #2296 from kevinbackhouse/tiff-offset-size_t
Use size_t for the offset argument in TiffComponent
3 years ago
Kevin Backhouse 89040ad1de
Fix implicit type conversions. 3 years ago
Kevin Backhouse d8bd05f4e8
Use size_t 3 years ago
Kevin Backhouse beaee05062
Change type of sizeDataArea_ 3 years ago
Kevin Backhouse 30debd2635
Use size_t for the offset. 3 years ago
Rosen Penev e34395e095 replace shared_ptr with make_shared
The former creates a nullptr. The latter actually allocates.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev c03af98725 clang-tidy: use auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 5a08e33fd8 sonarlint: replace loop with find_if
Sonarlint complains about this loop for some reason. Convert to find_if
to fix.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev aae02babba sonarlint: replace lock_guard with scoped_lock
C++17 allows scoped_lock, which sonarlint recommends.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 5d2d47032b replace [0] with front() where applicable
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago