[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#189866: patch



Attached is the patch to correct this bug.

diff -ur apt-0.5.27/apt-pkg/tagfile.cc apt-0.5.27-new/apt-pkg/tagfile.cc
--- apt-0.5.27/apt-pkg/tagfile.cc	2003-05-19 18:13:57.000000000 +0100
+++ apt-0.5.27-new/apt-pkg/tagfile.cc	2005-01-07 03:15:19.000000000 +0000
@@ -185,6 +185,15 @@
    TagCount = 0;
    while (TagCount+1 < sizeof(Indexes)/sizeof(Indexes[0]) && Stop < End)
    {
+      // Discard comment lines
+      if ( Stop[0] == '#' )
+      {
+         Stop = (const char *)memchr(Stop,'\n',End - Stop);
+         if (Stop == 0)
+	    return false;
+         Stop++;
+      }
+
       // Start a new index and add it to the hash
       if (isspace(Stop[0]) == 0)
       {

Reply to: