4347 Commits (ec561bb185395055151ea40b95e3e11bd0f6bd24)

Author SHA1 Message Date
Rosen Penev 7f5430a7d4 use lower()
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 35b6780d02 clang-tidy: don't assign in if
Found with bugprone-assignment-in-if-condition

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev d1a2cd0b76 clang-tidy: cast initial variable
Fixes: bugprone-integer-division

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev e188df1e14 fix implicit conversion
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev b3ff42f2d5 use if constexpr
Suggested by MSVC.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 629f94eea3 unreachable code
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev d2ddf228ad replace switch with if/return
Fixes warning C4702: unreachable code

No other way to make all compilers gappy.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev dde8765a49 don't assign in while
Fixes MSVC's warning C4706: assignment within conditional expression

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev b324f80443 use numeric limits instead of -1
Fixes MSVC warning.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev a10c08ba1d swap variables
These are the wrong way around. MSVC warns with /W4.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Mohamed Ali Chebbi b8b4a041a1 compilation issue on Windows 2 years ago
Mohamed Ali Chebbi 51ef600fe6 compilation issue on Mac OS 2 2 years ago
Mohamed Ali Chebbi c7aec66195 compilation issue on Mac OS 2 years ago
Mohamed Ali Chebbi bed8d3d93c rework of aspectRatio calculation for all video formats and rework the decoding of asf tags 2 years ago
Rosen Penev dee0598edf
clang-tidy fixes for recent stuff
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev f21b2a2170
std to Exiv2 find
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev b665574634
simplify loop
Just use upper

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 33e5ef5ffd
remove constructors
Just direct initialize

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Mohamed Ali Chebbi 6690e2e8f3
Merge branch 'Exiv2:main' into TestVideoData 2 years ago
Miloš Komarčević 13e6671de2
Update some Canon IDs (#2501) 2 years ago
Rosen Penev be387a60c3 add missing &
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 0f30198d9b remove mmap/munmap checks
Just check the header

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 2ddf00e7a2 use EXV_ICONV_CONST
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Mohamed Ali Chebbi 32576a3edf add test/data for video support : rework readStringWcharTag method 2 2 years ago
Mohamed Ali Chebbi 579cae8e77 add test/data for video support : rework readStringWcharTag method 2 years ago
Mohamed Ali Chebbi e388ba523f add test/data for video support : rename Xmp.video.Duration to Xmp.video.duration 2 years ago
Mohamed Ali Chebbi 3847a09359
Merge branch 'main' into TestVideoData 2 years ago
Mohamed Ali Chebbi f22db635b0 Merge branch 'TestVideoData' of github.com:mohamedchebbii/exiv2 into TestVideoData 2 years ago
Mohamed Ali Chebbi db14131262 add test/data for video support : enhance Debug messages 2 years ago
Rosen Penev e309680a86 remove deleted members from static classes
This is a holdover from C++98. No need anymore

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 ddb42eb159 remove some overriden defaulted destructors
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev d248e1a2af more delete removals
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev e7977554e2 default initializations
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 7aaf6414f2 move initialization up
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Mohamed Ali Chebbi 2b2173aafe
Merge branch 'Exiv2:main' into TestVideoData 2 years ago
Mohamed Ali Chebbi ada14ae292 add test/data for video support : use readStraingTag instead of read 2 years ago
Mohamed Ali Chebbi bf6546ee82 add test/data for video support : restore Riff HeaderReader and reserve addtional byte in readStraingTag 2 years ago
Mohamed Ali Chebbi acd71894b2 add test/data for video support : delete unused parameter from readList method 2 years ago
Mohamed Ali Chebbi 0f715288e7 add test/data for video support : delete riff HeaderReader 2 years ago
Mohamed Ali Chebbi 19f8b437c3 add test/data for video support : add enforce exceptions 2 years ago
Mohamed Ali Chebbi 340b46623d add test/data for video support : Fix codeQL warnings 2 years ago
Rosen Penev 0d353ac5f3 work around windows.h min/max macros
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev b8d4b9c6ea remove manual math
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Mohamed Ali Chebbi d288617759 add test/data for video support : Fix test issue 2 years ago
Mohamed Ali Chebbi 7ea32025d6 add test/data for video support : Format issue 2 years ago
Mohamed Ali Chebbi f9b94d3172 add test/data for video support : windows compilation issue 2 years ago
Mohamed Ali Chebbi f5e731cd38 add test/data for video support : fix ci issue 2 years ago
Mohamed Ali Chebbi d2fa07d559 Format issue 2 years ago
Mohamed Ali Chebbi a36e4dd1e8 Merge branch 'main' into TestVideoData 2 years ago
Mohamed Ali Chebbi cb7a48f84a Rework Asf and Riff formats ; add test/data for video support 2 years ago
Rosen Penev d874fc4dd8 use __has_include
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 77834807c2 add support for gcc and clang 7
Uses std::experimental::filesystem

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev e19ec79f98 safe_op: C++17 improvements
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 54dd2b54a5 clang-tidy: add const to parameter
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 2a690a135b use gnu_printf
Fixes warning under MinGW:

warning: unknown conversion type character 'z' in format [-Wformat=]

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev a7a9835431 more std::find to Exiv2::find
The latter is simpler.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 7fd7ee62a3 std::find to find template
std::find in C++20 can use ranges, which is equivalent here. Less error
prone.

Namespace is properly to avoid any conflicts with std::find or others

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Miloš Komarčević 0075ff631c
Merge pull request #2471 from Exiv2/pc_improve
Improve pkg-config file generation
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
Miloš Komarčević 15f0119707 Switch to CMake provided FindIconv 2 years ago
Miloš Komarčević 63f9926378 Add static linkages to pkg-config file 2 years ago
Rosen Penev 6976aab5bd replace substr with resize/pop_back
Shorter and more efficient.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev dd445e6c8d use find instead of count
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 0169739a4e add missing const
Found with cppcheck

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev aefd901bef fix copy constructors
clang-tidy couldn't transform these because of missing members

Found with cppcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Mohamed Ali Chebbi bbb3f5afa8 add test/data for video support : gix issue in riff video and reference data test 2 years ago
Mohamed Ali Chebbi 82ea6bef52 add test/data for video support : make asfvideo more readable and fix some issues 2 years ago
Mohamed Ali Chebbi 5deee73141
Merge branch 'Exiv2:main' into TestVideoData 2 years ago
Kevin Backhouse b55a0a564a
Silence unused parameter warning when EXV_ENABLE_INIH is undefined. 2 years ago
Kevin Backhouse 43c9ec0f50
Add EXIV2_ENABLE_INIH flag to enable building without libinih. 2 years ago
Mohamed Ali Chebbi 1bd52de0a9 add test/data for video support : delete filename (unuseful) 2 years ago
Rosen Penev 842ef05ee6 return nullptr instead of reset
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev ce8691bba3 remove double libintl check
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 dd3b3d4ff4 add const
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 3e97850e97 manual default member init
clang-tidy suggests this but fails to apply it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Mohamed Ali Chebbi 1c764358bb
Encapsulate video support with compilation variable EXV_ENABLE_VIDEO (#2448)
* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: add variable to unit test files

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: encapsulate in makefile

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: fix PR windows matrix

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: activate only for concerned CI tests

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: desable for linux release

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: add to Fuzz PR
3 years ago
Kevin Backhouse 346e11493f
Merge pull request #2443 from kevinbackhouse/inih-from-library3
Remove libinih from codebase and add it as a dependency instead
3 years ago
Rosen Penev bb311ba728 clang-tidy on Windows
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev f981c51eea get rid of -fanalyzer memory leaks
Don't use make_shared inside a function. Instead, change constructor to
value to have std::move.

Also move shared_ptrs everywhere. It's fairly expensive to copy.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev d458bf2540 clang-tidy: apply to newly merged stuff
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Mohamed Ali Chebbi 7fac35e19a
1748 Video Support in V1.0: part 3/3 : support Asfvideo (#2416)
* 1748 Video Support in V1.0: part 3/3 : support AsfVideo

* 1748 Video Support in V1.0: part 3/3 : support AsfVideo : fix Mac Os error compile

* 1748 Video Support in V1.0: part 3/3 : support AsfVideo : delete unuseful warnings

* code review and clean up some code
3 years ago
Rosen Penev f145fae33b replace any_of with find
Removes need for lambda.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev 304b13c271 use find instead of std::find_if
There's already an operator==

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev ff0491a102 clang-tidy: use make_unique
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Rosen Penev ce8920a0ea clang-tidy: various fixes
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Mohamed Ali Chebbi d755fc18b5
1748 Video Support in V1.0: part 2/3 : support Riffvideo (#2415)
* 1748 Video Support in V1.0: part 2/3 : support RiffVideo

* limit the buffer_size

* Update exiv2.md

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>

* Code Review and cleanUp code

* Update riffvideo.hpp

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
3 years ago
Mohamed Ali Chebbi 1280f3b849
1748 Video Support in V1.0: part 1/3 : support MatroskaViedo (#2413)
* 1748 Video Support in V1.0: part 1/3 : support MatroskaViedo

* Simplify the code of matroskavideo

* protect conevrtuint64 method from overflow

* use size_t instead of uint64_t
3 years ago
norbertwg 9ca161d1e5
Rename resp. remove duplicate exif keys (#2434)
* rename resp. remove duplicate Exif keys

Duplicate key names with different tag are renamed
Following most of the existing entries, the key with higher tag number
is renamed to ...2.
Exceptions: Canon.CustomFunctions,Olympus.ImageHeight,Olympus.ImageWidth
In the available images samples only the key with higher tag number is
used, so changing the other has less impact on test data and also on
users.
Canon.WhiteBalanceTable with tag 0x00a4 was listed twice, once with
description "SharpnessTable". The entry with the deviating description
is deleted.

* clang format

* adjust test output files (after merge with Exiv2)

* add Exif.NikonLd4.FocusDistance to EasyAccess API

* clang format
3 years ago
Kevin Backhouse ba258cb1ae
cmake fatal error if inih library is not found. 3 years ago
Kevin Backhouse a4164ce866
Remove libinih from codebase and add it as a dependency instead. 3 years ago
norbertwg 8d8ac99be0 Lens Recognition HD PENTAX-DA* 11-18mm F2.8 ED DC AW 3 years ago
Miloš Komarčević b52ade814b Prefer writing PNG eXIf chunk 3 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
Kevin Backhouse 9d044d30b1
Use Safe::add 3 years ago
Kevin Backhouse 292082df6f
Add break to loop to fix issue 2423, plus some other cleanups. 3 years ago
Rosen Penev 67df85135d early exit
less indentation

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Miloš Komarčević cf15cc52e0
Merge pull request #2417 from Exiv2/kmilos-patch-1
Add Canon R6m2 ID
3 years ago
norbertwg 74720d8044
Remove duplicate tag info entries fujifilm (#2412)
* remove duplicate Fuijifilm TagInfo entries

* test data added for some Fujifilm tags

* remove unknown tag 0x1200

* fix typo: SzeneRecognition to SceneRecognition
3 years ago
Peter 83d7915d00
Update `Exif.SonyMisc3c.*` and `Exif.Sony(1|2).SonyModelID` (#2420)
* Update `Exif.SonyMisc3c group`

* Update `Exif.Sony(1|2).SonyModelID`
3 years ago
Miloš Komarčević 5949ec9293
Add Canon R6m2 ID 3 years ago
Peter 1f364be1fa
Fix seg fault when using `iconv_open()` (#2403)
* Fix seg fault when using `iconv_open()`

- Fix failure condition for `iconv_open()`
- Add new exception when failing to change the text encoding of an
Exif comment

* Add testing for `iconv_open()` seg fault bug

* Fix Python test by changing log level
3 years ago
Kevin Backhouse ddd7ccf722 Use std::is_signed and std::enable_if. 3 years ago
Kevin Backhouse 335e13251e Add #error so the build fails if mmap isn't supported. 3 years ago
Kevin Backhouse 5cabd97373 Fix issue 2380: bug in (unused) non-mmap code. 3 years ago
Kevin Backhouse abd817d181 Use size_t for sizes and offsets. 3 years ago
Kevin Backhouse c96bc47509 Change return type of getFileLength() to int64_t. 3 years ago
Kevin Backhouse d599d36f8b
Merge pull request #2394 from kevinbackhouse/fix-issue-2393
stop looping when eof is hit
3 years ago
Rosen Penev 28d1880176 replace find/rfind with startsWith
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Kevin Backhouse 771ead8732
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52731
Stop looping when eof is hit.
3 years ago
Miloš Komarčević c077a06ada Add more Canon RF lenses and camera IDs 3 years ago
Miloš Komarčević 75f7285487 Remove translatable mark from RF lenses 3 years ago
Miloš Komarčević ecfdaca525 Add more Canon RF lenses 3 years ago
Miloš Komarčević 1f5bc3b8a5
Avoid buffer reallocation (#2392) 3 years ago
Kevin Backhouse fb6b769817
Merge pull request #2390 from kevinbackhouse/tiffvisitor-safe-add
Use Safe::add() in tiffvisitor_int.cpp
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ć 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