From: Ian Jackson Date: Thu, 20 Mar 2008 02:26:26 +0000 (+0200) Subject: Fix crash when a .deb file becomes unreadable while dpkg is starting X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=402e247056c58a16ec81ca894135dbfcf02575d8;p=dpkg Fix crash when a .deb file becomes unreadable while dpkg is starting Closes: #386210 --- diff --git a/ChangeLog b/ChangeLog index fd422302..6e42dbcd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-03-20 Ian Jackson + + * lib/tarfn.c (TarExtractor): Initialize h.LinkName and h.Name to + NULL. + 2008-03-16 Raphael Hertzog * scripts/Dpkg/Shlibs/Objdump.pm: Add "objid" property to diff --git a/debian/changelog b/debian/changelog index 2202e5c3..ffd82402 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,8 @@ dpkg (1.14.17) UNRELEASED; urgency=low Thanks to Ian Jackson. * Allow compilation with --disable-nls on systems without libintl.h where 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 ] * Add a warning displayed by dpkg-genchanges if the current version is diff --git a/lib/tarfn.c b/lib/tarfn.c index 397fedc4..66b33f28 100644 --- a/lib/tarfn.c +++ b/lib/tarfn.c @@ -140,6 +140,8 @@ TarExtractor( symListBottom = symListPointer = symListTop = m_malloc(sizeof(symlinkList)); symListTop->next = NULL; + h.Name = NULL; + h.LinkName = NULL; h.UserData = userData; while ( (status = functions->Read(userData, buffer, 512)) == 512 ) {