ソースを参照

Fix crash when a .deb file becomes unreadable while dpkg is starting

Closes: #386210
Ian Jackson 18 年 前
コミット
402e247056
共有3 個のファイルを変更した9 個の追加0 個の削除を含む
  1. 5 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 2 0
      lib/tarfn.c

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-03-20  Ian Jackson  <ian@davenant.greenend.org.uk>
+
+	* lib/tarfn.c (TarExtractor): Initialize h.LinkName and h.Name to
+	NULL.
+
 2008-03-16  Raphael Hertzog  <hertzog@debian.org>
 2008-03-16  Raphael Hertzog  <hertzog@debian.org>
 
 
 	* scripts/Dpkg/Shlibs/Objdump.pm: Add "objid" property to
 	* scripts/Dpkg/Shlibs/Objdump.pm: Add "objid" property to

+ 2 - 0
debian/changelog

@@ -27,6 +27,8 @@ dpkg (1.14.17) UNRELEASED; urgency=low
     Thanks to Ian Jackson.
     Thanks to Ian Jackson.
   * Allow compilation with --disable-nls on systems without libintl.h where
   * Allow compilation with --disable-nls on systems without libintl.h where
     a non glibc claims to be glibc. Closes: #465420
     a non glibc claims to be glibc. Closes: #465420
+  * Fix crash when a .deb file becomes unreadable while dpkg is starting.
+    Thanks to Ian Jackson. Closes: #386210
 
 
   [ Raphael Hertzog ]
   [ Raphael Hertzog ]
   * Add a warning displayed by dpkg-genchanges if the current version is
   * Add a warning displayed by dpkg-genchanges if the current version is

+ 2 - 0
lib/tarfn.c

@@ -140,6 +140,8 @@ TarExtractor(
 	symListBottom = symListPointer = symListTop = m_malloc(sizeof(symlinkList));
 	symListBottom = symListPointer = symListTop = m_malloc(sizeof(symlinkList));
 	symListTop->next = NULL;
 	symListTop->next = NULL;
 
 
+	h.Name = NULL;
+	h.LinkName = NULL;
 	h.UserData = userData;
 	h.UserData = userData;
 
 
 	while ( (status = functions->Read(userData, buffer, 512)) == 512 ) {
 	while ( (status = functions->Read(userData, buffer, 512)) == 512 ) {