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

Bug#401263: Apt still segfaulting



Goedson Teixeira Paixao <goedson@debian.org> writes:

> Em Qua, 2006-12-06 às 17:12 +0100, Andreas Barth escreveu:
>> * Goedson Teixeira Paixao (goedson@debian.org) [061206 17:07]:
>> > 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;
>> 
>> I assume that only this fix is responsible for not segfaulting anymore,
>> and rest is for fixing the FTBFS (that I cannot reproduce, btw).
>
> I've just reviewed the patch above and, although it did avoid the
> segmentation fault, I believe the condition should be:
>
>  if (File.FileName() == NULL || FileName != File.FileName())
>
> I've just tested APT this way and it is all fine.

This indeed looks better to me.

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio@debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."



Reply to: