[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:27 UTC 2017


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

The following commit has been merged in the master branch:
commit 8761340ed7acd7767eac331f2407bf144f1f0d2c
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Mon Mar 13 03:55:26 2006 +0000

    Check C-string pointer before using it. Fixes bug #456
---
 src/value.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/value.cpp b/src/value.cpp
index a7b2e41..917b4ec 100644
--- a/src/value.cpp
+++ b/src/value.cpp
@@ -193,13 +193,14 @@ namespace Exiv2 {
     int StringValueBase::read(const byte* buf, long len, ByteOrder byteOrder)
     {
         // byteOrder not needed
-        value_ = std::string(reinterpret_cast<const char*>(buf), len);
+        if (buf) value_ = std::string(reinterpret_cast<const char*>(buf), len);
         return 0;
     }
 
     long StringValueBase::copy(byte* buf, ByteOrder byteOrder) const
     {
         // byteOrder not needed
+        assert(buf != 0);
         return static_cast<long>(
             value_.copy(reinterpret_cast<char*>(buf), value_.size())
             );
@@ -237,7 +238,7 @@ namespace Exiv2 {
     int AsciiValue::read(const std::string& buf)
     {
         value_ = buf;
-        if (value_[value_.size()-1] != '

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list