fix some unitialized data members
authorMichael Vogt <mvo@debian.org>
Mon, 5 Aug 2013 20:40:28 +0000 (22:40 +0200)
committerMichael Vogt <mvo@debian.org>
Mon, 5 Aug 2013 20:40:28 +0000 (22:40 +0200)
apt-pkg/cdrom.h
apt-pkg/contrib/sha2.h
apt-pkg/tagfile.h

index 4fc3d39..7d19eb8 100644 (file)
@@ -18,7 +18,7 @@ class pkgCdromStatus                                                  /*{{{*/
    int totalSteps;
 
  public:
-   pkgCdromStatus() {};
+   pkgCdromStatus() : totalSteps(0) {};
    virtual ~pkgCdromStatus() {};
 
    // total steps
index 51c921d..8e0c99a 100644 (file)
@@ -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));
    };
 };
 
index 4718f51..126f421 100644 (file)
@@ -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() {};
 };