[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:37:25 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=a2b8c3f
The following commit has been merged in the master branch:
commit a2b8c3f327284f11bfb638cd0148281dbf8ee4ce
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Fri Feb 3 08:13:34 2006 +0000
Added testcase and warning for bug #451
---
src/ifd.cpp | 10 ++++++++++
test/bugfixes-test.sh | 4 ++++
test/data/bugfixes-test.out | 5 +++++
3 files changed, 19 insertions(+)
diff --git a/src/ifd.cpp b/src/ifd.cpp
index ccedce0..7531d5d 100644
--- a/src/ifd.cpp
+++ b/src/ifd.cpp
@@ -431,6 +431,16 @@ namespace Exiv2 {
// Set the offset to the data, relative to start of IFD
e.setOffset(tmpOffset - offset_);
// Set the size to at least for bytes to accomodate offset-data
+#ifndef SUPPRESS_WARNINGS
+ if (i->type_ < 1 || i->type_ > 10 || i->type_ == 6) {
+ std::cerr << "Warning: "
+ << ExifTags::ifdName(ifdId_) << " tag 0x"
+ << std::setw(4) << std::setfill('0') << std::hex
+ << i->tag_ << " has invalid Exif type "
+ << std::dec << i->type_
+ << "; using 7 (undefined).
";
+ }
+#endif
e.setValue(i->type_, i->count_, buf + start + e.offset(),
std::max(long(4), i->size_));
this->add(e);
diff --git a/test/bugfixes-test.sh b/test/bugfixes-test.sh
index 3725f68..5cd7028 100755
--- a/test/bugfixes-test.sh
+++ b/test/bugfixes-test.sh
@@ -45,6 +45,10 @@ num=445
filename=`prep_file $num`
$binpath/exiv2 -v -M'set Exif.Photo.UserComment A comment' $filename
$binpath/exiv2 -pt $filename
+filename=exiv2-empty.jpg
+cp -f ../data/$filename .
+$binpath/exiv2 -v -M'set Exif.Photo.UserComment A comment' $filename
+$binpath/exiv2 -pt $filename
num=447 # Problem only visible in Valgrind
filename=`prep_file $num`
diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out
index 098173a..02466a1 100644
--- a/test/data/bugfixes-test.out
+++ b/test/data/bugfixes-test.out
@@ -201,7 +201,12 @@ Exif.Thumbnail.YResolution Rational 1 180
Exif.Thumbnail.ResolutionUnit Short 1 inch
Exif.Thumbnail.JPEGInterchangeFormat Long 1 0
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 5448
+File 1/1: exiv2-empty.jpg
+Set Exif.Photo.UserComment "A comment" (Comment)
+Exif.Image.ExifTag Long 1 26
+Exif.Photo.UserComment Undefined 17 A comment
------> Bug 447 <-------
+Warning: Exif tag 0x9286 has invalid Exif type 14; using 7 (undefined).
Iptc.Application2.Caption String 0
Iptc.Application2.DateCreated Date 8 2005-08-09
Iptc.Application2.TimeCreated Time 11 01:28:31-07:00
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list