[Kdenlive-devel] [PATCH kdenlive 1/2] Initialise m_profile to zero

Mikko Rapeli mikko.rapeli at iki.fi
Wed Sep 28 19:39:38 UTC 2011


Should fix valgrind warning:

Conditional jump or move depends on uninitialised value(s)
at 0x811D1FD: KdenliveDoc::setProfilePath(QString) (kdenlivedoc.cpp:871)
---
 src/kdenlivedoc.cpp |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/kdenlivedoc.cpp b/src/kdenlivedoc.cpp
index 8b7a13e..157ad23 100644
--- a/src/kdenlivedoc.cpp
+++ b/src/kdenlivedoc.cpp
@@ -68,6 +68,18 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
     m_modified(false),
     m_projectFolder(projectFolder)
 {
+    // init m_profile struct
+    m_profile.frame_rate_num = 0;
+    m_profile.frame_rate_den = 0;
+    m_profile.width = 0;
+    m_profile.height = 0;
+    m_profile.progressive = 0;
+    m_profile.sample_aspect_num = 0;
+    m_profile.sample_aspect_den = 0;
+    m_profile.display_aspect_num = 0;
+    m_profile.display_aspect_den = 0;
+    m_profile.colorspace = 0;
+
     m_clipManager = new ClipManager(this);
     m_autoSaveTimer = new QTimer(this);
     m_autoSaveTimer->setSingleShot(true);
-- 
1.7.5.4




More information about the Kdenlive mailing list