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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:36:46 UTC 2017


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

The following commit has been merged in the master branch:
commit d05e3c1644e79f6994b2cd7b9bdfa1d4c8eb3fcd
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Mon Nov 29 14:54:44 2004 +0000

    Added check of the size of the Exif APP segment
---
 src/image.cpp | 2 ++
 src/image.hpp | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/src/image.cpp b/src/image.cpp
index 6c02a2e..78ecf5e 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -43,6 +43,7 @@ EXIV2_RCSID("@(#) $Id$");
 
 #include "image.hpp"
 #include "types.hpp"
+#include "error.hpp"
 
 // + standard includes
 #include <cstdio>
@@ -231,6 +232,7 @@ namespace Exiv2 {
 
     void JpegBase::setExifData(const byte* buf, long size)
     {
+        if (size > 0xffff) throw Error("Exif data too large");
         clearExifData();
         if (size) {
             sizeExifData_ = size;
diff --git a/src/image.hpp b/src/image.hpp
index 49fff65..8bb1f27 100644
--- a/src/image.hpp
+++ b/src/image.hpp
@@ -312,6 +312,15 @@ namespace Exiv2 {
                   -4 if renaming the temporary file fails;<br>
          */
         int writeMetadata();
+        /*!
+          @brief Set the Exif data. The data is copied into an internal data
+                 buffer and is not written until writeMetadata is called.
+          @param buf Pointer to the new Exif data.
+          @param size Size in bytes of new Exif data.
+
+          @throw Error ("Exif data too large") if the exif data is larger than
+                 65535 bytes (the maximum size of JPEG APP segments)
+         */
         void setExifData(const byte* buf, long size);
         void clearExifData();
         void setIptcData(const byte* buf, long size);

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list