summaryrefslogtreecommitdiff
path: root/data/_apt7/tolerance.diff
blob: ce2ff0adb68d8a38958210001a2d63c7d1fbf646 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff -ru apt-0.7.20.2/apt-pkg/deb/deblistparser.cc apt-0.7.20.2+iPhone/apt-pkg/deb/deblistparser.cc
--- apt-0.7.20.2/apt-pkg/deb/deblistparser.cc	2010-02-22 08:57:37.000000000 +0000
+++ apt-0.7.20.2+iPhone/apt-pkg/deb/deblistparser.cc	2010-02-22 09:40:28.000000000 +0000
@@ -643,11 +643,18 @@
    iOffset = Tags.Offset();
    while (Tags.Step(Section) == true)
    {      
+      const char *Start;
+      const char *Stop;
+
+      if (Section.Find("Package",Start,Stop) == false) {
+         _error->Warning("Encountered a section with no Package: header");
+	 continue;
+      }
+
       /* See if this is the correct Architecture, if it isn't then we
          drop the whole section. A missing arch tag only happens (in theory)
          inside the Status file, so that is a positive return */
-      const char *Start;
-      const char *Stop;
+
       if (Section.Find("Architecture",Start,Stop) == false)
 	 return true;