On Sun, Oct 02, 2005 at 11:57:59AM -0300, Guilherme de S. Pastore wrote: > First of all, thanks for aptitude 0.3.4, it really *ROCKS*! =D However, > I've just found a pretty annoying bug in it, and it's perfectly > reproducible: just run aptitude, look for mutt, ask aptitude to view its > changelog and *BOOM*, you get a segfault. > > I think this should be enough for you to reproduce the problem. If any > further useful information can be provided, though, just ask =)
Is mutt currently installed on your computer? If it is and you are up to the task, would you mind checking if the attached patch fixes the problem? If it's not, then the attached fix should solve the problem and I can close this in the next upload. Daniel
Sun Oct 2 17:07:10 PDT 2005 Daniel Burrows <[EMAIL PROTECTED]> * Don't crash when showing the changelog of a not-installed package. The crash was in the code to find the current version (so newer versions can be highlighted): the existing code tested for the case where the current version's version string was NULL (something that shouldn't happen!), but didn't test for the case where there WAS no current version. diff -rN -u old-aptitude/src/view_changelog.cc new-aptitude/src/view_changelog.cc --- old-aptitude/src/view_changelog.cc 2005-10-03 18:52:52.000000000 -0700 +++ new-aptitude/src/view_changelog.cc 2005-10-02 17:05:45.000000000 -0700 @@ -151,7 +151,7 @@ pkgCache::VerIterator curver = ver.ParentPkg().CurrentVer(); string curverstr; - if(curver.VerStr() != NULL) + if(!curver.end() && curver.VerStr() != NULL) curverstr = curver.VerStr(); fragment *f = make_changelog_fragment(n, curverstr);