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

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:43:38 UTC 2017


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

The following commit has been merged in the master branch:
commit 9e37b9d17cafc7fd0a3975383c3ad73f3eda6f17
Author: Abhinav Badola <mail.abu.to at gmail.com>
Date:   Tue Mar 26 08:36:01 2013 +0000

    #890: Fixed some possible issues of crashing due to in-efficient management of buffers in riffvideo.cpp
---
 src/riffvideo.cpp | 44 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 40 insertions(+), 4 deletions(-)

diff --git a/src/riffvideo.cpp b/src/riffvideo.cpp
index 29e54d7..9c5aff9 100644
--- a/src/riffvideo.cpp
+++ b/src/riffvideo.cpp
@@ -651,6 +651,13 @@ namespace Exiv2 {
 
              if(equalsRiffTag(buf, "AVIF")) {
 
+                 if (size - 4 < 0) {
+             #ifndef SUPPRESS_WARNINGS
+                     EXV_ERROR   << " Exif Tags found in this RIFF file are not of valid size ."
+                                 << " Entries considered invalid. Not Processed.
";
+             #endif
+                 }
+                 else {
                  io_->read(buf.pData_, size - 4);
 
                  IptcData iptcData;
@@ -674,6 +681,7 @@ namespace Exiv2 {
                  }
          #endif
              }
+             }
               // TODO decode CasioData and ZORA Tag
         io_->seek(cur_pos + size, BasicIo::beg);
 
@@ -737,7 +745,7 @@ namespace Exiv2 {
         io_->seek(-12, BasicIo::cur);
         io_->read(buf.pData_, 4);
 
-        unsigned long internal_size = 0, tagID = 0, dataSize = 0, tempSize, size = Exiv2::getULong(buf.pData_, littleEndian);
+        long internal_size = 0, tagID = 0, dataSize = 0, tempSize, size = Exiv2::getULong(buf.pData_, littleEndian);
         tempSize = size; char str[9] = " . . . ";
         uint64_t internal_pos, cur_pos; internal_pos = cur_pos = io_->tell();
         const TagDetails* td;
@@ -761,8 +769,16 @@ namespace Exiv2 {
                     temp -= (4 + dataSize);
 
                     if(tagID == 0x0001) {
+                        if (dataSize <= 0) {
+                    #ifndef SUPPRESS_WARNINGS
+                            EXV_ERROR   << " Makernotes found in this RIFF file are not of valid size ."
+                                        << " Entries considered invalid. Not Processed.
";
+                    #endif
+                        }
+                        else {
                         io_->read(buf.pData_, dataSize);
                         xmpData_["Xmp.video.MakerNoteType"] = buf.pData_;
+                        }
                     }
                     else if (tagID == 0x0002) {
                         while(dataSize) {
@@ -783,6 +799,14 @@ namespace Exiv2 {
                     dataSize = Exiv2::getULong(buf.pData_, littleEndian);
                     temp -= (4 + dataSize);
                     td = find(nikonAVITags , tagID);
+
+                    if (dataSize <= 0) {
+                #ifndef SUPPRESS_WARNINGS
+                        EXV_ERROR   << " Makernotes found in this RIFF file are not of valid size ."
+                                    << " Entries considered invalid. Not Processed.
";
+                #endif
+                    }
+                    else {
                     io_->read(buf.pData_, dataSize);
 
                     switch (tagID) {
@@ -809,6 +833,7 @@ namespace Exiv2 {
                     default:
                         break;
                     }
+                    }
                 }
             }
 
@@ -836,8 +861,8 @@ namespace Exiv2 {
         buf.pData_[4] = '

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list