summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/debindexfile.cc2
-rw-r--r--apt-pkg/deb/deblistparser.h11
-rw-r--r--apt-pkg/deb/debsrcrecords.cc3
-rw-r--r--apt-pkg/deb/dpkgpm.cc3
4 files changed, 16 insertions, 3 deletions
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index eee758b7a..a0dd15cd8 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -525,7 +525,7 @@ bool debTranslationsIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
if (FileExists(TranslationFile))
{
FileFd Trans(TranslationFile,FileFd::ReadOnly, FileFd::Extension);
- debListParser TransParser(&Trans);
+ debTranslationsParser TransParser(&Trans);
if (_error->PendingError() == true)
return false;
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index baace79fe..3b6963211 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -106,4 +106,15 @@ class debListParser : public pkgCacheGenerator::ListParser
APT_HIDDEN unsigned char ParseMultiArch(bool const showErrors);
};
+class debTranslationsParser : public debListParser
+{
+ public:
+ // a translation can never be a real package
+ virtual std::string Architecture() { return ""; }
+ virtual std::string Version() { return ""; }
+
+ debTranslationsParser(FileFd *File, std::string const &Arch = "")
+ : debListParser(File, Arch) {};
+};
+
#endif
diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
index b09588dd3..a444cbe4d 100644
--- a/apt-pkg/deb/debsrcrecords.cc
+++ b/apt-pkg/deb/debsrcrecords.cc
@@ -186,6 +186,7 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &List)
/* */
debSrcRecordParser::~debSrcRecordParser()
{
- delete[] Buffer;
+ // was allocated via strndup()
+ free(Buffer);
}
/*}}}*/
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index e410594df..613a4de9f 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1438,7 +1438,8 @@ bool pkgDPkgPM::GoNoABIBreak(APT::Progress::PackageManager *progress)
if (_config->FindB("DPkg::FlushSTDIN",true) == true && isatty(STDIN_FILENO))
{
- int Flags,dummy;
+ int Flags;
+ int dummy = 0;
if ((Flags = fcntl(STDIN_FILENO,F_GETFL,dummy)) < 0)
_exit(100);