9278 Commits (18a981e8957b440fc08341f7aff06449eb416b2c)
 

Author SHA1 Message Date
Miloš Komarčević 029dc9f24a Add some Sony IDs 2 years ago
Rosen Penev 1837bf055e memcpy to copy_n conversions
The latter is more strict regarding types

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 640282f33b replace reinterpret_cast with copy_n
On mips64, this throws a cast-align warning. Silence it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev d4f6c9cf40 coverity fixes
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 7473b4a715 optimize toAscii function with early exit
GCC is able to see that the branch is useless as it can be done at
compile time. Produces shorter assembly with both -O2 and -O3.

https://godbolt.org/z/ejhfxh8Tx

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Miloš Komarčević c686bed5f8 Use compiler macros for endianness 2 years ago
Rosen Penev 50648dd4b0 use if constexpr instead of macros
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 7477293e41 avoid newer clang-format issue
More readable anyway.

Also remove specific version. Problems have been fixed already. All
versions should work the same now.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 50eca1696e github CI: remove msvcrt
msvcrt support was effectively killed when wstring support was removed.
No need to test for it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 8a09f2dee1 avoid LTO issues
Place structs inside the places where used.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Matthias Andree 901e8ba8c7 Fix preprocessor warnings about undefined _MSVC_LANG
Stricter compiler/settings, such as found during a build
on FreeBSD with clang 14, issue warnings of the kind below.

/usr/local/include/exiv2/value.hpp:1272:31: warning: '_MSVC_LANG' is not defined, evaluates to 0 [-Wundef]

Fix: Guard use of _MSVC_LANG by a check.

Personally, I found that MSVC has several feature-specific
checks in predefined macros which might allow for one
standards-based check that matches GCC/clang/MSVC rather than the
split check for C++ standard and MSVC language version settings.

See https://en.cppreference.com/w/cpp/feature_test

I am not building Exiv2 on MSVC, so I cannot test/suggest
anything here.
2 years ago
Matthias Andree 91af0905db FreeBSD Fix getLoadedLibraries() crash
FreeBSD's getLoadedLibraries() uses libprocstat(3) to obtain
the list of mapped files (libraries). However, the list
obtained from procstat_getfiles() does not only return regular files,
but might also return anonymous objects that have no fs->path.

With exiv2 v0.28, I had also observed crashes with a real TTY,
and the entry->fs_path dereference would crash, even if it
was only for a test "non-null", so we need something more thorough.

Add a check to only consider VNODEs (actual file system entries),
and also make sure that entry->fs_path is defined so we don't
pass a nullptr to the std::string(const char *) constructor when
we are reading corrupt data. std::string((const char *)0)
on FreeBSD 13.2 - calls strlen() and crashes there.
2 years ago
Rosen Penev d18a21847b avoid division by 0 false positive
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 4783581b27 add null dynamic_cast checks
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 4c4bf7c749 avoid copy_n
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Kevin Backhouse 9215f74000
Merge pull request #2663 from kevinbackhouse/fuzz-metadatum-print-nullptr
Fuzz Metadata::print() with nullptr parameter
2 years ago
Rosen Penev e4a4791b35 endian check from runtime to compile time
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Kevin Backhouse 469c76c838
Fuzz Metadata::print() with nullptr parameter. 2 years ago
Kevin Backhouse 3664f5b826
Merge pull request #2665 from kevinbackhouse/metadata-null-checks
Check if the metadata is NULL
2 years ago
Kevin Backhouse a89c02f927 Add support for indirect null-pointer dereferences. 2 years ago
Kevin Backhouse 79ffedcbb5 Add CodeQL query to warn about null pointer exceptions in the print functions. 2 years ago
Kevin Backhouse 1119a68a1e
Check if the metadata is NULL. 2 years ago
Kevin Backhouse 360c6cd41f
Check if the metadata is NULL. 2 years ago
Miloš Komarčević 6b186a4cd2 Add new Exif 3.0 tags
(cherry picked from commit eb303ae63e79bf680901951c2ddcc7386f15e71b)
2 years ago
Kevin Backhouse 0e1ef67fc2 Enable CodeQL analysis of workflow yaml files. 2 years ago
luzpaz 39a4b9b930 Fix various typos
Found via `codespell -q 3 -S *.po,*.pot,*.ts,./doc/ChangeLog,./xmpsdk -L alis,discus,filetest,ist,nd,ois,optio,siz,te,tempdate`
Excluded 3rd-party code (ie ./xmpsdk)
2 years ago
Kevin Backhouse 3202e86e73 Avoid triggering assertion in std::vector::operator[] 2 years ago
Kevin Backhouse 33071f33b2 Fix unit test failure. 2 years ago
Kevin Backhouse 96d0e5faf1 Allow c_data() to return zero byte buffer. 2 years ago
Miloš Komarčević b66ebd9481 Fix regression parsing PNG text chunks with zero length payload
(cherry picked from commit 16c1cd7da0cd159ee2d53c39088564edaf046c77)
2 years ago
Rosen Penev d234d63c28 optimize toString slightly
Also get rid of if constexpr for C++11 compatibility. The else condition
results in extra generated code as compilers are not free to promote if
to if constexpr.
2 years ago
Rosen Penev 6ee4a168ca reduce nesting of operator
Easier to read

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
norbertwg f7de846909 clang format 2 years ago
norbertwg 31620a6522 adjust descriptions in canonLiOpId to fit tag name 2 years ago
Ryan 22b65ccfea
Sort and remove duplicates (#2631)
* python3 was duplicated

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2 years ago
Miloš Komarčević 05ccb5ae58
Merge pull request #2613 from cytrinox/fuji_xmp_fix
Extract XMP data from embedded JPEG preview inside RAF files
2 years ago
Daniel Vogelbacher c493e38d5a RAF: Copy comment from embedded JPEG image 2 years ago
Ryan Friedman 445757a3d1 Remove extra build directories that are no longer needed
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2 years ago
Ryan Friedman ce242fc00a Preserve existing behavior with removing build dir
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2 years ago
Ryan Friedman f0785018c0 Bump minimum cmake and stop creating build directory
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2 years ago
Daniel Vogelbacher f5f1f30f5b RAF: Ignore JPEG decoder errors if the JPEG offsets are invalid 2 years ago
Thomas Klausner d92fb10cdb Fix build on NetBSD. 2 years ago
Thomas Klausner b0eefcda75 Adapt for NetBSD iconv() prototype change. 2 years ago
Miloš Komarčević ec6c806717 Fix MinGW shared library name in readme 2 years ago
Miloš Komarčević c04dcc8341 Remove exiv2-xmp from CMake exported config 2 years ago
Miloš Komarčević 972795741b Remove exiv2-xmp from pkg-config file 2 years ago
Miloš Komarčević 3d0ef18160 Remove exiv2-xmp from readme 2 years ago
Rosen Penev 3caa9fc098 meson: increase minimum version to 0.54.1
0.54.1 fixed a bug with cmake config files which meson 1.1.0 warns on.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Miloš Komarčević 56b2ba8933 Update .mergify.yml 2 years ago
Daniel Vogelbacher d27c5ac838 RAF: Simplify metadata extraction
Remove manual TiffParser usage for reading APP1 segement,
instead use JpegImage for proper parsing.
2 years ago