[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:42:34 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=3db4d31

The following commit has been merged in the master branch:
commit 3db4d3193882bcd22e66cfcf3b2286b8855ca1e8
Author: vog <vog at notjusthosting.com>
Date:   Tue Jul 12 23:52:21 2011 +0000

    Handle trailing garbage after XMP metadata in EPS files more gracefully
---
 src/epsimage.cpp                                   |  7 ++++---
 ...-flat_minimal_xmp-garbage-before-endmarker.eps} |  2 +-
 ...inimal_xmp-garbage-before-endmarker.eps.newxmp} |  0
 ...-flat_minimal_xmp-garbage-before-endmarker.xmp} |  0
 test/data/eps/eps-test.out                         | 22 ++++++++++++++++++++++
 5 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/src/epsimage.cpp b/src/epsimage.cpp
index fc7a004..55eada9 100644
--- a/src/epsimage.cpp
+++ b/src/epsimage.cpp
@@ -644,10 +644,11 @@ namespace {
                 #ifndef SUPPRESS_WARNINGS
                 EXV_WARNING << "Unexpected " << line.size() << " bytes of data after XMP at position: " << (xmpPos + xmpSize) << "
";
                 #endif
-                if (write) throw Error(21);
+                flexibleEmbedding = false;
+            } else {
+                readLine(line, data, posLineAfterXmp, posEndEps);
+                flexibleEmbedding = (line == "% &&end XMP packet marker&&" || line == "%  &&end XMP packet marker&&");
             }
-            readLine(line, data, posLineAfterXmp, posEndEps);
-            flexibleEmbedding = (line == "% &&end XMP packet marker&&" || line == "%  &&end XMP packet marker&&");
             if (flexibleEmbedding) {
                 #ifdef DEBUG
                 EXV_DEBUG << "readWriteEpsMetadata: XMP embedding is flexible
";
diff --git a/test/data/eps/eps-flat_minimal_xmp-readonly.eps b/test/data/eps/eps-flat_minimal_xmp-garbage-before-endmarker.eps
similarity index 96%
copy from test/data/eps/eps-flat_minimal_xmp-readonly.eps
copy to test/data/eps/eps-flat_minimal_xmp-garbage-before-endmarker.eps
index 671fc79..5747f3a 100644
--- a/test/data/eps/eps-flat_minimal_xmp-readonly.eps
+++ b/test/data/eps/eps-flat_minimal_xmp-garbage-before-endmarker.eps
@@ -29,7 +29,7 @@
         <rdf:Description rdf:about="" xmlns:test="http://www.example.com/" test:test="TEST"/>
     </rdf:RDF>
 </x:xmpmeta>
-<?xpacket end="r"?>
+<?xpacket end="w"?> % some garbage between XMP and end marker
 % &&end XMP packet marker&&
 [/Document 1 dict begin
     /Metadata {Exiv2_metadata_stream} def currentdict end /BDC Exiv2_pdfmark
diff --git a/test/data/eps/eps-flat_minimal-eof.eps.newxmp b/test/data/eps/eps-flat_minimal_xmp-garbage-before-endmarker.eps.newxmp
similarity index 100%
copy from test/data/eps/eps-flat_minimal-eof.eps.newxmp
copy to test/data/eps/eps-flat_minimal_xmp-garbage-before-endmarker.eps.newxmp
diff --git a/test/data/eps/eps-flat_empty-xmp.xmp b/test/data/eps/eps-flat_minimal_xmp-garbage-before-endmarker.xmp
similarity index 100%
copy from test/data/eps/eps-flat_empty-xmp.xmp
copy to test/data/eps/eps-flat_minimal_xmp-garbage-before-endmarker.xmp
diff --git a/test/data/eps/eps-test.out b/test/data/eps/eps-test.out
index cb18414..1f37292 100644
--- a/test/data/eps/eps-test.out
+++ b/test/data/eps/eps-test.out
@@ -358,6 +358,28 @@ Warning: Unable to find XMP embedding trailer ending at position: 1424
 eps-flat_minimal_missing-xmp-embedding-trailer.eps: Could not write metadata to file: Failed to write image
 Exit code: 1
 
+-----> eps-flat_minimal_xmp-garbage-before-endmarker.eps <-----
+
+Command: exiv2 -u -pa eps-flat_minimal_xmp-garbage-before-endmarker.eps
+Warning: Unexpected 42 bytes of data after XMP at position: 1250
+Xmp.test.test                                XmpText     4  TEST
+Exit code: 253
+
+Command: exiv2 -f -eX eps-flat_minimal_xmp-garbage-before-endmarker.eps
+Warning: Unexpected 42 bytes of data after XMP at position: 1250
+Exit code: 0
+
+Command: exiv2 -ix eps-flat_minimal_xmp-garbage-before-endmarker.eps
+Warning: Unexpected 42 bytes of data after XMP at position: 1250
+Warning: Unexpected 42 bytes of data after XMP at position: 1250
+Exit code: 0
+
+Command: (2) exiv2 -ix eps-flat_minimal_xmp-garbage-before-endmarker.eps
+Exit code: 0
+
+Command: exiv2 -f -ex eps-flat_minimal_xmp-garbage-before-endmarker.eps
+Exit code: 0
+
 -----> eps-flat_minimal_xmp-readonly.eps <-----
 
 Command: exiv2 -u -pa eps-flat_minimal_xmp-readonly.eps

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list