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

Bug#709560: apt-get segfaults when installing linux-headers-3.8-2-amd64 on Wheezy



On Thu, Nov 28, 2013 at 02:07:10PM -0500, Robert Edmonds wrote:
> Michael Vogt wrote:
> > I have some idea what is triggering this, but I need some help to be sure.
> > 
> > Could you please provide the /etc/apt/sources.list and
> > /etc/apt/preferences file so that I can try to reproduce the issue? A
> > gdb backtrace would be great as well.
> 
> here you go:
[..]

Thanks a bunch. I can reproduce it now and attached a small fix, but
I'm still investigating the root cause.

Cheers,
 Michael
diff --git a/apt-private/private-install.h b/apt-private/private-install.h
index 439c897..54ffabf 100644
--- a/apt-private/private-install.h
+++ b/apt-private/private-install.h
@@ -106,6 +106,8 @@ struct TryToInstall {
       for (std::list<std::pair<pkgCache::VerIterator, pkgCache::VerIterator> >::const_iterator c = Changed.begin();
 	   c != Changed.end(); ++c)
       {
+         if (c->first == NULL)
+            continue;
 	 if (c->second.end() == true)
 	    ioprintf(out, _("Selected version '%s' (%s) for '%s'\n"),
 		     c->first.VerStr(), c->first.RelStr().c_str(), c->first.ParentPkg().FullName(true).c_str());

Reply to: