[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=67c0b7d

The following commit has been merged in the master branch:
commit 67c0b7d04b8948b29f9fe3981417b0b02d4aa50c
Author: Abhinav Badola <mail.abu.to at gmail.com>
Date:   Tue Mar 26 09:14:24 2013 +0000

    #890: Fixed some possible issues of crashing due to in-efficient management of buffers in asfvideo.cpp
---
 src/asfvideo.cpp | 48 +++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 37 insertions(+), 11 deletions(-)

diff --git a/src/asfvideo.cpp b/src/asfvideo.cpp
index e2ec2f5..6120d41 100644
--- a/src/asfvideo.cpp
+++ b/src/asfvideo.cpp
@@ -557,27 +557,53 @@ namespace Exiv2 {
 
             io_->read(buf.pData_, 2);
             descLength = Exiv2::getUShort(buf.pData_, littleEndian) * 2;
-            io_->read(buf.pData_, descLength);
 
-            if(codecType == 1)
-                xmpData_["Xmp.video.Codec"] = toString16(buf);
-            else if(codecType == 2)
-                xmpData_["Xmp.audio.Compressor"] = toString16(buf);
+            if (descLength < 0) {
+            #ifndef SUPPRESS_WARNINGS
+                    EXV_ERROR   << " Description found in this ASF file is not of valid size ."
+                                << " Entries considered invalid. Not Processed.
";
+            #endif
+            }
+            else {
+                io_->read(buf.pData_, descLength);
+                if(codecType == 1)
+                    xmpData_["Xmp.video.Codec"] = toString16(buf);
+                else if(codecType == 2)
+                    xmpData_["Xmp.audio.Compressor"] = toString16(buf);
+            }
 
             std::memset(buf.pData_, 0x0, buf.size_);
             io_->read(buf.pData_, 2);
             descLength = Exiv2::getUShort(buf.pData_, littleEndian) * 2;
-            io_->read(buf.pData_, descLength);
 
-            if(codecType == 1)
-                xmpData_["Xmp.video.CodecDescription"] = toString16(buf);
-            else if(codecType == 2)
-                xmpData_["Xmp.audio.CodecDescription"] = toString16(buf);
+            if (descLength < 0) {
+            #ifndef SUPPRESS_WARNINGS
+                    EXV_ERROR   << " Description found in this ASF file is not of valid size ."
+                                << " Entries considered invalid. Not Processed.
";
+            #endif
+            }
+            else {
+                io_->read(buf.pData_, descLength);
+
+                if(codecType == 1)
+                    xmpData_["Xmp.video.CodecDescription"] = toString16(buf);
+                else if(codecType == 2)
+                    xmpData_["Xmp.audio.CodecDescription"] = toString16(buf);
+            }
 
             std::memset(buf.pData_, 0x0, buf.size_);
             io_->read(buf.pData_, 2);
             descLength = Exiv2::getUShort(buf.pData_, littleEndian);
-            io_->read(buf.pData_, descLength);
+
+            if (descLength < 0) {
+            #ifndef SUPPRESS_WARNINGS
+                    EXV_ERROR   << " Description found in this ASF file is not of valid size ."
+                                << " Entries considered invalid. Not Processed.
";
+            #endif
+            }
+            else {
+                io_->read(buf.pData_, descLength);
+            }
         }
     } // AsfVideo::codecList
 

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list