Просмотр исходного кода

Fix segfault when --auto-deconfigure is given. This is causes because the
deconfigure list is allocated in an obstack, but then freed with normal
free().

Adam Heath лет назад: 24
Родитель
Сommit
8abdf365f9
3 измененных файлов с 8 добавлено и 2 удалено
  1. 6 0
      ChangeLog
  2. 1 0
      debian/changelog
  3. 1 2
      main/archives.c

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+Sat Aug 24 14:16:13 CDT 2002 Adam Heath <doogie@debian.org>
+
+  * lib/archives.c: Fix segfault when --auto-deconfigure is given.  This is
+    causes because the deconfigure list is allocated in an obstack, but
+    then freed with normal free().
+
 Thu Aug 22 23:37:45 CDT 2002 Adam Heath <doogie@debian.org>
 
   * lib/database.c, lib/parse.c, lib/parsehelp.c, main/main.c: Fix several

+ 1 - 0
debian/changelog

@@ -6,6 +6,7 @@ dpkg (1.10.5) unstable; urgency=low
   * Handle directories better in md5sum.  Closes: #157453.
   * Fix read past buffer in lib/nfmalloc.c.  Closes: #157304.
   * Fix several read pass buffer bugs, and a memleak.  Closes: #155362.
+  * Fix segfault when --auto-deconfigure is given.  Closes: #157762.
 
  -- Adam Heath <doogie@debian.org>  UNRELEASED
 

+ 1 - 2
main/archives.c

@@ -653,8 +653,7 @@ static int try_remove_can(struct deppossi *pdep,
       }
     }
     pdep->up->up->clientdata->istobe= itb_deconfigure;
-    ensureobstackinit();
-    newdeconf= obstack_alloc(&tar_obs, sizeof(struct packageinlist));
+    newdeconf= malloc(sizeof(struct packageinlist));
     newdeconf->next= deconfigure;
     newdeconf->pkg= pdep->up->up;
     deconfigure= newdeconf;