From 4ccd3b3ce69d6a6598e1773689a44fdec78a85cc Mon Sep 17 00:00:00 2001
From: Michael Vogt <mvo@debian.org>
Date: Mon, 5 Aug 2013 22:40:28 +0200
Subject: fix some unitialized data members

---
 apt-pkg/cdrom.h        | 2 +-
 apt-pkg/contrib/sha2.h | 4 +++-
 apt-pkg/tagfile.h      | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/apt-pkg/cdrom.h b/apt-pkg/cdrom.h
index 4fc3d3928..7d19eb813 100644
--- a/apt-pkg/cdrom.h
+++ b/apt-pkg/cdrom.h
@@ -18,7 +18,7 @@ class pkgCdromStatus							/*{{{*/
    int totalSteps;
 
  public:
-   pkgCdromStatus() {};
+   pkgCdromStatus() : totalSteps(0) {};
    virtual ~pkgCdromStatus() {};
 
    // total steps
diff --git a/apt-pkg/contrib/sha2.h b/apt-pkg/contrib/sha2.h
index 51c921dbd..8e0c99a1b 100644
--- a/apt-pkg/contrib/sha2.h
+++ b/apt-pkg/contrib/sha2.h
@@ -60,10 +60,11 @@ class SHA256Summation : public SHA2SummationBase
       res.Set(Sum);
       return res;
    };
-   SHA256Summation() 
+   SHA256Summation()
    {
       SHA256_Init(&ctx);
       Done = false;
+      memset(&Sum, 0, sizeof(Sum));
    };
 };
 
@@ -96,6 +97,7 @@ class SHA512Summation : public SHA2SummationBase
    {
       SHA512_Init(&ctx);
       Done = false;
+      memset(&Sum, 0, sizeof(Sum));
    };
 };
 
diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h
index 4718f5101..126f4219d 100644
--- a/apt-pkg/tagfile.h
+++ b/apt-pkg/tagfile.h
@@ -84,7 +84,7 @@ class pkgTagSection
       Stop = this->Stop;
    };
    
-   pkgTagSection() : Section(0), TagCount(0), Stop(0) {};
+   pkgTagSection() : Section(0), TagCount(0), Stop(0), d(NULL) {};
    virtual ~pkgTagSection() {};
 };
 
-- 
cgit v1.2.3