summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:01:37 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:01:37 +0000
commitacfe730660b33aa49f97740688c26e3725e1994c (patch)
tree8f850b33b32097ea0a482dc35700e5e51762ea2f
parentcfce80065eb8658b8347ac419021e4a30cf4e119 (diff)
Fix segfault when handling /etc/apt/preferences.
Author: doogie Date: 2003-05-19 17:58:26 GMT Fix segfault when handling /etc/apt/preferences.
-rw-r--r--apt-pkg/versionmatch.cc10
-rw-r--r--debian/changelog1
-rw-r--r--po/apt-all.pot2
3 files changed, 9 insertions, 4 deletions
diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc
index 1abb7e4ad..9e341852b 100644
--- a/apt-pkg/versionmatch.cc
+++ b/apt-pkg/versionmatch.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: versionmatch.cc,v 1.8 2003/04/24 03:16:58 doogie Exp $
+// $Id: versionmatch.cc,v 1.9 2003/05/19 17:58:26 doogie Exp $
/* ######################################################################
Version Matching
@@ -208,8 +208,12 @@ bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File)
if (Type == Origin)
{
- if (!strcmp(File.Archive(), "now")) /* ignore local "status" file */
- return false;
+ if (OrSite.empty() == false) {
+ if (File->Site == 0 || OrSite != File.Site())
+ return false;
+ } else // so we are talking about file:// or status file
+ if (strcmp(File.Site(),"") == 0 && File->Archive != 0) // skip the status file
+ return false;
return (OrSite == File.Site()); /* both strings match */
}
diff --git a/debian/changelog b/debian/changelog
index 1cf2ac3a1..9486e18b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ apt (0.5.5.1) unstable; urgency=low
backing out change that incorretly attempted to handle Package sections
larger than 32k. Closes: #192373
* Fix never-ending loop with apt-get install -V. Closes: #192355.
+ * Fix segfault when handling /etc/apt/preferences. Closes: #192409.
-- Adam Heath <doogie@debian.org> Mon, 19 May 2003 12:30:16 -0500
diff --git a/po/apt-all.pot b/po/apt-all.pot
index c235fd08d..11b07c81f 100644
--- a/po/apt-all.pot
+++ b/po/apt-all.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2003-05-19 12:22-0500\n"
+"POT-Creation-Date: 2003-05-19 12:54-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"