From 402e247056c58a16ec81ca894135dbfcf02575d8 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 20 Mar 2008 04:26:26 +0200 Subject: [PATCH] Fix crash when a .deb file becomes unreadable while dpkg is starting Closes: #386210 --- ChangeLog | 5 +++++ debian/changelog | 2 ++ lib/tarfn.c | 2 ++ 3 files changed, 9 insertions(+) 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 ) { -- 2.39.5