Commit Graph

190 Commits

Author SHA1 Message Date
Luis Díaz Más
f30022d73d
Fix issues detected with PVS-Studio + other little improvements (#1689)
* avoid re-declaration of constant variables

* Replace pthreads critical section with std::mutex

* ci - better naming

* cmake - increase minimum version to 3.11. Use project DESCRIPTION

* fix - do not treat string::find() return type as bool

* remove conditions that were always true

* remove condition that were always false

* Remove EXV_HAVE_GMTIME_R which is not used anymore

* pixelWidth_ was inherited from Exiv2::Image

The width & height variables in the TiffImage class need to be mutable
to be able to change their values on the getters pixelHeight() and
pixelWidth() ... Do not ask me why ...

* Remove superfluous if

* pvs:V766 item with identical key added already

* pvs:V730 not all members were initialized (time)

* pvs:V730 not all members are initialized

* pvs:v668 no point in testing pointer against null after new

* pvs:V1048 variable assigned the same value

* replace c-style dynamic vector with std one

* pvs:547 fakeData is always true

* Remove useless constructor in derived class

* pvs:V690 modern way to disable copy-ctor

* Replace malloc/free with new/delete. No need to check for null

* pvs:V1028 cast operands and not result

* Remove custom MIN/MAX functions

* pvs:V595 pointer used before verified against null

* pvs: index used before being checked

* pvs:V1028 possible overflow. Cast operands

* pvs:v575 potential null pointer passed to other functions

* pvs:V547 deal with always true/false expressions

* pvs:V560 part of conditional expressions always false or true

* pvs:V701 possible break in realloc -> move to std::vector

* Make some classes 'final'

* Replace sprintf with std::to_string()

* fix compilation on windows
2021-06-01 12:39:10 +02:00
Rosen Penev
2c57f214c5 clang-tidy: use nullptr
Found with modernize-use-nullptr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-26 08:31:45 +02:00
Rosen Penev
86c71ae6c3 clang-tidy: avoid global non const variables
Found with cppcoreguidelines-avoid-non-const-global-variables

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-25 08:43:27 +02:00
Rosen Penev
743da1a564 clang-tidy: use C++ casting
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-20 07:29:02 +02:00
Rosen Penev
24a8139233 clang-tidy: fix badly indented if
Found with readability-misleading-indentation

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-14 17:51:45 +02:00
Rosen Penev
bf290e84e5 fix compilation with EXIV2_DEBUG_MESSAGES
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-14 17:23:10 +02:00
Rosen Penev
4ceb325c8f clang-tidy: range for loop conversions
Found with modernize-loop-convert

Ran through git clang-format.

Also removed several questionable loops and replaced with simpler
algorithms.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-05-03 14:50:04 +02:00
Luis Díaz Más
f85f7f717a Replace many of the iterators types with auto 2021-04-19 10:43:46 +02:00
Luis Díaz Más
0bbaa6eff3 cpp: Replace auto_ptr by unique_ptr 2021-04-15 06:56:11 +02:00
Robin Mills
d632988bbd Massive code prolog cleanup. 2021-03-17 13:34:21 +00:00
Robin Mills
9b877f8506 Success. It's working! 2020-11-26 20:23:03 +00:00
Luis Díaz Más
113136e134 Replace DEBUG with EXIV2_DEBUG_MESSAGES
Fixes #926
2019-07-12 11:14:35 +02:00
Luis Díaz Más
670fb73dd5 Fix #457 2018-10-13 11:37:57 +02:00
Robin Mills
afb98cbc6e Allocate correct amount of memory for the ICC profile 2018-09-13 11:18:29 +02:00
Robin Mills
8ff26931e3 Do not use Image::printStructure() when reading images as this causes security issues. 2018-09-13 11:18:29 +02:00
Luis Díaz Más
603692a1d8 Copyright to Exiv2 authors 2018-09-12 19:22:31 +02:00
tbeu
9c507b9d20 Fix function declaration
V762 It is possible a virtual function was overridden incorrectly. See third argument of function 'printStructure' in derived class 'TiffImage' and base class 'Image'. tiffimage.hpp 93
2018-06-02 09:43:20 +02:00
Dan Čermák
efe2ccdcb6 Replaced all hardcoded error codes with ker... constants 2018-02-18 09:28:57 +01:00
Luis Díaz Más
d3748152a7 add _int suffix to all the internal files 2017-11-28 17:36:08 +01:00
tbeu
5b5987a596 Remove obsolete EXIV2_RCSID 2017-11-19 11:17:12 +01:00
tbeu
5df8b01b77 Remove obsolete svn revision 2017-11-19 11:17:11 +01:00
Robin Mills
82dbe6199d https://github.com/Exiv2/exiv2/issues/11 Closed. Coincidentally Raphael reported issues with Visual Studio 2015 Community Edition. Issue 11 and Raphael's issues should now be resolved. 2017-06-29 22:13:26 +01:00
Robin Mills
6d5c2c3256 Getting ready to release v0.26 2017-03-08 20:42:28 +00:00
Robin Mills
2ebacb6b0b #1272 Use in-memory temporary files. 2017-03-05 17:42:12 +00:00
Robin Mills
461b431bc1 #1231 Thank You to Ayke for providing the patch. 2016-12-02 10:31:10 +00:00
Robin Mills
a057af1616 #1244. Removing experimental APIs introduced by r4637. I submitted those APIs just to retain the code somewhere. I have no plan to release such as API. 2016-10-17 16:32:58 +00:00
Robin Mills
f5956d5db2 #1230 Fixes to read tiff with web-ready. Includes the BasicIo expiremental API readUnmarked() and markRead() which I will remove later. 2016-10-17 15:48:42 +00:00
Robin Mills
5f1d52e497 #1230 Added stdin-test and fixing issue identified by the test. 2016-09-25 22:43:40 +00:00
Robin Mills
88b3f77796 #1074 Fix bug in TiffImage printStructure() for large icc profiles. 2016-09-22 20:52:02 +00:00
Robin Mills
7bd874049e #1074 Work in progress. -eC -pC -eC- work for JPG/PNG/TIFF/WEBP. pngimage::doWriteMetadata() does not update iCCP chunk. 2016-09-14 20:25:21 +00:00
Robin Mills
5edc759cc9 #1074 For discussion see: http://dev.exiv2.org/issues/1074#note-23 2016-09-14 10:02:51 +00:00
Robin Mills
3d57bbc6e6 #1074 Work in progress. ICC Jpeg/Png/Tiff exiv2 -eC foo.xxx writes good foo.icc profiles. icc-test.sh is broken and to be investigated. 2016-09-12 17:42:12 +00:00
Robin Mills
9ff2224fd7 #1074. Rollback r4479 which has inflicted a lot harm on the test harness. 2016-09-11 15:31:28 +00:00
Robin Mills
3aaebf50f7 #1074 Added ICC support to tiffimage.writeMetadata(). pngimage.readMetadata() is not complete. 2016-09-09 15:18:59 +00:00
Robin Mills
0cc97c7f23 #1189 Use in-memory file to dump Nikon MakerNote tag 0x927c 2016-06-13 05:49:40 +00:00
Robin Mills
7e285c650d More corrections to r4316 for msvc build breakers 2016-06-09 18:48:09 +00:00
Robin Mills
cbdba2bb12 More corrections to r4316 for msvc build breakers 2016-06-09 11:40:33 +00:00
Robin Mills
66fd2d3272 Correction to r4316 to deal with msvc build breaker. 2016-06-09 09:08:52 +00:00
Robin Mills
c211816b2c #1189 See issue report for discussion. 2016-06-08 17:08:01 +00:00
Robin Mills
bc1abeac26 #1108 Discovered another embedded tiff tag SubIFDs 2016-05-02 20:51:59 +00:00
Robin Mills
06b072e39b #1108. Correction to r4285. Code simplication. 2016-04-22 15:13:13 +00:00
Robin Mills
58c5ffdedc #1108. Fixed issue with printing short strings which are stored in the directory offset field. 2016-04-22 14:11:09 +00:00
Robin Mills
00984afaa2 #1178 Thanks to Terence for reporting this an providing confidential test data 2016-04-19 20:17:20 +00:00
Robin Mills
e7b804f3f5 #1108 Refactored static indent(depth) from png/tiff/jpeg to Internal::indent(depth) 2016-03-18 07:48:15 +00:00
Robin Mills
09c734fbcd #1108. Refactored the IPTC printStructure code from png/jpeg/tiff into iptc.cpp 2016-03-17 23:45:58 +00:00
Robin Mills
6e19d043ef #1108 Added IPTC parser for tiff. 2016-03-17 22:14:21 +00:00
Robin Mills
8e7eaa65a7 #1057, #1064, #922, #1148. Work in progress. This is a composite patch of several matters in development. None are totally complete at this time. 2016-03-09 07:51:04 +00:00
Robin Mills
1f9de360a7 Fixed formatting issue in -pS/-pR output. 2016-03-05 23:29:27 +00:00
Robin Mills
d81e552cb7 #1074 -pC now works on tiff files. Added test convenience targets to Makefile 2016-01-07 19:05:06 +00:00
Robin Mills
4617dc3728 #1108 and #1074 -pC and -pR (print Color Profile, print Recursively) now work on png. 2016-01-07 16:13:28 +00:00