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

Bug#401263: Apt still segfaulting



Hi,

APT version 0.6.46.3-0.2 is still segfaulting for any operation I try to
use it. In fact, it even failed to build from source on my system
(Architecture is i386). Attached is a patch tha fixes the FTBFS and the
segmentation faults. With this patch applied, it seems to work fine,
now.

Regards,

-- 
Goedson Teixeira Paixao          http://mundolivre.wordpress.com/
Debian Project                   http://www.debian.org/
Jabber ID: goedson@jabber.org    http://www.jabber.org/

diff -ru apt-0.6.46.3/apt-pkg/deb/debindexfile.cc apt-0.6.46.3.new/apt-pkg/deb/debindexfile.cc
--- apt-0.6.46.3/apt-pkg/deb/debindexfile.cc	2006-03-29 22:27:33.000000000 -0300
+++ apt-0.6.46.3.new/apt-pkg/deb/debindexfile.cc	2006-12-06 13:19:36.000000000 -0200
@@ -305,7 +305,7 @@
    pkgCache::PkgFileIterator File = Cache.FileBegin();
    for (; File.end() == false; File++)
    {
-      if (FileName != File.FileName())
+       if (File.FileName() != NULL && FileName != File.FileName())
 	 continue;
       
       struct stat St;
diff -ru apt-0.6.46.3/apt-pkg/vendorlist.cc apt-0.6.46.3.new/apt-pkg/vendorlist.cc
--- apt-0.6.46.3/apt-pkg/vendorlist.cc	2006-03-02 10:56:30.000000000 -0300
+++ apt-0.6.46.3.new/apt-pkg/vendorlist.cc	2006-12-06 12:31:06.000000000 -0200
@@ -113,7 +113,7 @@
 
 const Vendor* pkgVendorList::LookupFingerprint(string Fingerprint)
 {
-   for (const_iterator I = begin(); I != end(); ++I)
+   for (const_iterator I = VendorList.begin(); I != VendorList.end(); ++I)
    {
       if ((*I)->LookupFingerprint(Fingerprint) != "")
          return *I;
diff -ru apt-0.6.46.3/ftparchive/cachedb.cc apt-0.6.46.3.new/ftparchive/cachedb.cc
--- apt-0.6.46.3/ftparchive/cachedb.cc	2006-07-25 04:35:54.000000000 -0300
+++ apt-0.6.46.3.new/ftparchive/cachedb.cc	2006-12-06 12:42:19.000000000 -0200
@@ -406,7 +406,7 @@
    if (Fd->Seek(0) == false || SHA256.AddFD(Fd->Fd(),CurStat.FileSize) == false)
       return false;
    
-   SHA256Res = SHA256.Result();
+   SHA256Res = SHA256.Result().Value();
    hex2bytes(CurStat.SHA256, SHA256Res.data(), sizeof(CurStat.SHA256));
    CurStat.Flags |= FlSHA256;
    return true;
diff -ru apt-0.6.46.3/ftparchive/writer.cc apt-0.6.46.3.new/ftparchive/writer.cc
--- apt-0.6.46.3/ftparchive/writer.cc	2006-03-29 22:01:29.000000000 -0300
+++ apt-0.6.46.3.new/ftparchive/writer.cc	2006-12-06 12:48:12.000000000 -0200
@@ -899,7 +899,7 @@
    fd.Seek(0);
    SHA256Summation SHA256;
    SHA256.AddFD(fd.Fd(), fd.Size());
-   CheckSums[NewFileName].SHA256 = SHA256.Result();
+   CheckSums[NewFileName].SHA256 = SHA256.Result().Value();
 
    fd.Close();
    

Attachment: signature.asc
Description: Esta =?ISO-8859-1?Q?=E9?= uma parte de mensagem assinada digitalmente


Reply to: