Commit Graph

3038 Commits

Author SHA1 Message Date
clanmills
4cf040ac4a
Install man page from man/man1/exiv2.1 2019-09-15 23:00:07 +02:00
clanmills
90f9f0bc19
Add support for Exif.Canon.AF tags to be read from images
This PR (and fix981_canonAutoFocus2) use a decoder listed in TiffMappingInfo to
decode Exif.Canon.AFInfo. The decoding function "manufactures" Exif tags such as
Exif.Canon.AFNumPoints from the data in Exif.Canon.AFInfo. These tags must never
be written to file and are removed from the metadata in
exif.cpp/ExifParser::encode().

Three of the tags created (AFPointsInFocus,AFPointsSelected, AFPrimaryPoint) are
bitmasks. As the camera can have up to 64 focus points, the tags are a 64 bit
mask to say which points are active. The function printBitmask() reports data
such as 1,2,3 or (none).

This decoding function decodeCanonAFInfo() added to TiffMappingInfo manufactures
the new tags. Normally, tags are processed by the binary tag decoder and that
approach was taken in branch fix981_canonAf. However, the binary tag decoder
cannot deal with AFInfo because the size of some metadata arrays cannot be
determined at compile time.
2019-09-14 11:28:18 +02:00
sat3ll
d59d929eb2
add ID for Sigma APO MACRO 180mm F3.5 EX DG (nikon)
(cherry picked from commit 9852e21761d962a7deb1e5e9673b3b5f5018dbfb)
2019-08-28 13:53:06 +02:00
Marek Kubica
515569030b Remove AF designator from Tamron 70-200 G1
This removes the AF from the name of the lens thus matching the name
that lensfun and exiftool determine.

(cherry picked from commit a573f9795baa1cf8a68296a80114fdc575f84319)
2019-08-27 22:12:59 +00:00
Kevin Backhouse
edb4bf78ca Add bounds check to MemIo::seek(). (#944)
- Regression test for missing bounds check in MemIo::seek()
- Add bounds check to MemIo::seek(), this fixes CVE-2019-13504

(cherry picked from commit bd0afe0390439b2c424d881c8c6eb0c5624e31d9)

Additional fixes for 0.27:
- Add fix for the linux variant of MemIo::seek
- Change type of variable from unsigned to signed
2019-07-28 12:43:06 +02:00
Robin Mills
76d2798172 Pushing very helpful suggestion by @lantw44 2019-07-17 22:30:18 +02:00
clanmills
94a777609e fix947_FreeBSD_BasicError_typeinfo 2019-07-17 22:30:18 +02:00
Luis Díaz Más
e925bc5add Fix integer overflow by checking size against header_size
Note that the problem occurs when data_size is less than header_size
what causes a buffer overflow in &data[i]

Co-Authored-By: D4N <dan.cermak@cgc-instruments.com>
2019-07-15 22:35:51 +02:00
Luis Diaz Mas
c4bfd0f0f1 Remove linkage with -ldl
The code using dlopen/dlclose/etc was removed from version.cpp in the past
2019-07-13 08:01:30 +02:00
Luis Díaz Más
113136e134 Replace DEBUG with EXIV2_DEBUG_MESSAGES
Fixes #926
2019-07-12 11:14:35 +02:00
Kevin Backhouse
cb7dc5a528 Check for integer overflows in mrwimage.cpp 2019-07-05 15:41:14 +01:00
Robin Mills
ab375fb074 Add support for FocusPosition in Sony RAW files (#906)
* Fix 582 Add support for FocusPosition in Sony RAW files
* Thanks to @boardhead sonyFpCrypt() works correctly. Removed debug code. Fixed typos.
* Update doc/templates/Makefile to process Sony2Fp
* Following review by @boardhead. Renamed sonyFpCrypt() as sonyTagDecipher().
* Fixed writing the tag thanks to @boardhead explaining encipher/decipher.
  Sadly, ArrayCfg/crpyt does not know if he's encrypting/decrypting.
  I've added a sniff in TiffEncoder::visitBinaryArrayEnd to avoid changing the API.
* Added URL to discussion concerning sonyTagCipher()
* make sonyTagCipher() a static function with no external visibility.
2019-06-26 21:36:59 +02:00
Robin Mills
0a47d93ccf Add README-SAMPLES.md and remove exiv2samples.1 (#921)
* Add README-SAMPLES.md and remove exiv2samples.1
* Remove samples man page from CMake
* Add all sample programs to Doxygen.
* Adding links to source code on exiv2.org

Authored-By: Robin Mills <robin@clanmills.com>
Authored-By: Luis Díaz Más <piponazo@gmail.com>
2019-06-25 23:06:39 +02:00
Luis Díaz Más
df5054b910
Merge branch '0.27-maintenance' into 0.27-use-libssh-config 2019-06-24 07:45:56 +02:00
Andreas Sturmlechner
e85ce17fc9
Switch to libssh's own libssh-config.cmake
This is provided by libssh since 2013.
2019-06-23 19:50:01 +02:00
Andreas Sturmlechner
6819f2ac45
Fix install path of exiv2ConfigVersion.cmake
This seems to have been caused by duplicate work between master branch
and 0.27-maintenance branch, as commit 3b48249eeb350301dfb3efa3ba6f7d7b162455be
had already got that right.
2019-06-23 19:32:29 +02:00
Robin Mills
db3a260167 Changes following code review. 2019-06-18 21:29:55 +02:00
Robin Mills
b6f82a8f58 Change byte order in nikonAf22Cfg to invalidByteOrder (see #880 and #885). 2019-06-18 21:29:55 +02:00
Robin Mills
bd1e7522c2 Simplification of TiffDecoder::decodeTiffEntry(). 2019-06-18 21:29:55 +02:00
Robin Mills
b02c80f7e4 fix646_NikonAF22 2019-06-18 21:29:55 +02:00
Luis Diaz Mas
43ed51f609 DLL information depends now on proper definition 2019-06-15 14:07:51 +02:00
clanmills
d8a513b7df Updated following code review. 2019-06-10 22:02:51 +01:00
clanmills
742cd5885b Fixing Windows build-breaker for EXV_UNICODE_PATH in Protocol fileProtocol(const std::wstring& path) 2019-06-07 13:49:56 +01:00
clanmills
ab0b97c729 fix895-ICCProfile-FalseWarning 2019-06-06 12:33:09 +01:00
Robin Mills
5a3afa9cbe Update man page src/exiv2.1 to clarify overwrite policy with command rename
This fixes #662
2019-06-04 09:49:54 -04:00
sat3ll
2beefab719 Add Tamron SP 70-300mm f/4-5.6 Di VC USD (Model: A030) (Nikon Mount)
(cherry picked from commit 1640ac8d0ca8bbb975f7a986bf0537545423fffc)
2019-05-27 07:35:31 +02:00
Robin Mills
2451e7ba56 fix880_NikonEndian 2019-05-21 17:26:27 +02:00
clanmills
b1ed1bf246 fix743_NikonSigmaArtLens 2019-05-21 11:30:33 +01:00
Kevin Backhouse
b35c43e7c2 Remove call to atol, which might read off the end of the buffer. (#870) 2019-05-17 12:45:42 +02:00
Kevin Backhouse
9092b422e6 Prevent out-of-bounds read. (#868) 2019-05-17 07:06:56 +02:00
Kevin Backhouse
6068df4c01 Add better bounds checking in PngImage::printStructure(). (#862) 2019-05-17 05:44:28 +02:00
Kevin Backhouse
109d5df7ab Check bounds of jpg_img_off and jpg_img_len. (#858) 2019-05-16 15:30:12 +02:00
Kevin Backhouse
1c1436e94e Add bounds check of resourceSize. (#856) 2019-05-16 11:24:18 +02:00
Kevin Backhouse
80cd0d2990 Add bounds check on allocation size. (#854) 2019-05-16 09:36:26 +02:00
Kevin Backhouse
81ae213c71 Check bounds of allocation size. (#848) 2019-05-15 13:00:41 +02:00
Kevin Backhouse
7798ae2557 Throw an exception if the data location is invalid. (#842) 2019-05-15 11:12:02 +02:00
Kevin Backhouse
8dc87a1214 Add bounds check. (#840) 2019-05-15 08:58:38 +02:00
Kevin Backhouse
43f154f44b Merge two enforces into one. 2019-05-14 17:31:37 +02:00
Kevin Backhouse
d3e69f6d2c Add bounds check on allocation size. 2019-05-14 17:31:37 +02:00
Kevin Backhouse
c0ecc2ae36 Avoid integer overflow. 2019-05-13 22:46:25 +02:00
Robin Mills
f4a37c63f2 version.cpp Pragma removed. Platform includes simplified.
cmake/packaging.cmake        Changed comment about VS version numbers
2019-05-12 16:41:58 +02:00
Robin Mills
b8af098285 Removed redundant _MSC_VER pragma to link psapi as the link is specified in CMakeLists.txt.
Simplified the platform include files required to support getLoadedLibraries()
2019-05-12 16:41:58 +02:00
Robin Mills
955962eaa8 Code revisions after review by @piponazo 2019-05-12 16:41:58 +02:00
Robin Mills
b0a9cb5624 NetBSD/FreeBSD Support 2019-05-12 16:41:58 +02:00
Kevin Backhouse
6a44698abc Small change to comment. 2019-05-12 14:15:21 +02:00
Kevin Backhouse
3c818f49d9 Revert accidental whitespace change. 2019-05-12 14:15:21 +02:00
Kevin Backhouse
3faeaefbf5 Improve portability of bounds checks. 2019-05-12 14:15:21 +02:00
Kevin Backhouse
86816c0280 Fix signed/unsigned mismatch. 2019-05-12 14:15:21 +02:00
Kevin Backhouse
caa4e6745a Avoid negative integer overflow when filesize < io_->tell().
This fixes #791.
2019-05-12 14:15:21 +02:00
clanmills
db870755b9 fix #818. Restore 0.25 behaviour of $ exiv2 -g image ... to apply grep to keys. 2019-05-11 07:35:26 +02:00