From 4ccd3b3ce69d6a6598e1773689a44fdec78a85cc Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 5 Aug 2013 22:40:28 +0200 Subject: fix some unitialized data members --- apt-pkg/tagfile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/tagfile.h') 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 From b40394c0ff509954c37254b0993a985ea3ff1467 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 6 Aug 2013 09:13:27 +0200 Subject: memset() pkgTagSections data to make coverity happy --- apt-pkg/tagfile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/tagfile.h') diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index 126f4219d..7b496ffd8 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), d(NULL) {}; + pkgTagSection(); virtual ~pkgTagSection() {}; }; -- cgit v1.2.3 From f52037d629aea696f938015e7f1ec037eb079af8 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 8 Aug 2013 15:40:15 +0200 Subject: fix -Wall errors --- apt-pkg/tagfile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/tagfile.h') diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index 126f4219d..fedd72701 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), d(NULL) {}; + pkgTagSection() : Section(0), TagCount(0), d(NULL), Stop(0) {}; virtual ~pkgTagSection() {}; }; -- cgit v1.2.3 From 0aae6d14390193e25ab6d0fd49295bd7b131954f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 15 Aug 2013 16:49:51 +0200 Subject: ensure that pkgTagFile isn't writing past Buffer length In 91c4cc14d3654636edf997d23852f05ad3de4853 I removed the +256 from the pkgTagFile call parsing Release files as I couldn't find a mentioning of a reason for why and it was marked as XXX which suggested that at least someone else was suspicious. It turns out that it is indeed "documented", it just didn't found it at first but the changelog of apt 0.6.6 (29. Dec 2003) mentions: * Restore the ugly hack I removed from indexRecords::Load which set the pkgTagFile buffer size to (file size)+256. This is concealing a bug, but I can't fix it right now. This should fix the segfaults that folks are seeing with 0.6.[45]. The bug it is "hiding" is that if pkgTagFile works with a file which doesn't end in a double newline it will be adding it without checking if the Buffer is big enough to store them. Its also not a good idea to let the End pointer be past the end of our space, even if we don't access the data. Closes: 719629 --- apt-pkg/tagfile.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/tagfile.h') diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index fedd72701..66c56799d 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -95,6 +95,7 @@ class pkgTagFile bool Fill(); bool Resize(); + bool Resize(unsigned long long const newSize); public: -- cgit v1.2.3