[Aptitude-svn-commit] r4147 - in branches/aptitude-0.3/aptitude: . src

Daniel Burrows dburrows at costa.debian.org
Wed Sep 21 05:58:21 UTC 2005


Author: dburrows
Date: Wed Sep 21 05:58:18 2005
New Revision: 4147

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/apt_info_tree.cc
Log:
Fix a bug that would probably lead to similar memory corruption.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Wed Sep 21 05:58:18 2005
@@ -1,5 +1,10 @@
 2005-09-20  Daniel Burrows  <dburrows at debian.org>
 
+	* src/apt_info_tree.cc:
+
+	  Preemptively fix a likely problem that turned up in an audit for
+	  other instances of the access-this-after-self-destructing bug.
+
 	* src/solution_screen.cc:
 
 	  Have the examiner take a reference to itself in the destroy()

Modified: branches/aptitude-0.3/aptitude/src/apt_info_tree.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/apt_info_tree.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/apt_info_tree.cc	Wed Sep 21 05:58:18 2005
@@ -37,6 +37,8 @@
 
 void apt_info_tree::restore_state()
 {
+  ref_ptr<apt_info_tree> tmpref(this);
+
   reset_incsearch();
 
   pkgCache::PkgIterator pkg=(*apt_cache_file)->FindPkg(package);



More information about the Aptitude-svn-commit mailing list