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

Re: Bug#120311: apt-cache segfaults on malformed status-file



On Thu, 12 Sep 2002, Branden Robinson wrote:

> > The original segfault was a simply a delete of an uninitialized pointer,
> > initing it to 0 makes it safe since delete 0 is a nop.
> 
> If it's desirable for apt-cache to never return any data, then yeah,
> it's valid.  Otherwise it's still broken.  But I think people want an
> apt-cache program that isn't just a rewrite of /bin/true.

I'm lost here, the original report was that the status file was corrupted
and when that happens the parser fails, and segfaults before it can report
any error. My fix makes the segfault go away and the error should come out
properly.

Your diff shows that you have defeated the error reporting mechanism, you
need to drop the return statement you added to have it work properly.

Once you know what your particular error is then you can try to fix that. 
Since you say it runs OK as a normal user it sounds like something bad has
happened to your cache files in /var/cache/apt/*.bin and erasing them will
surely make it run again. 

Jason



Reply to: