From 5f100a01af636c14a600bf53b22e2ca3f2fcc546 Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Thu, 19 Apr 2001 04:58:02 +0000 Subject: [PATCH] In blankpackage, intialize ->installed and ->available. Found by me and Fumitoshi UKAI . This should help several segfaults that people have been seeing in dpkg. --- ChangeLog | 6 ++++++ debian/changelog | 2 ++ lib/database.c | 2 ++ 3 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5a7a98f1..5318c164 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Apr 18 23:53:40 CDT 2001 Adam Heath + + * lib/database.c: In blankpackage, intialize ->installed and ->available. + Found by me and Fumitoshi UKAI . This should help + several segfaults that people have been seeing in dpkg. + Wed Apr 18 23:42:16 CDT 2001 Adam Heath * lib/mlib.c: If the buffer size is 0 in buffer_copy, then return, and diff --git a/debian/changelog b/debian/changelog index 79b29e4c..948fd82b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -56,6 +56,8 @@ dpkg (1.9.0) unstable; urgency=low processing substvars * Very package signatures if debsig-verify is installed * Handle window resize in dselect main menu. Closes: Bug#93559 + * Initialize all parts of the package record. This should fix several + segfaults people have been seeing in dpkg. Closes: #90328. -- Wichert Akkerman UNRELEASED diff --git a/lib/database.c b/lib/database.c index 2ca9c58d..dbc11726 100644 --- a/lib/database.c +++ b/lib/database.c @@ -123,6 +123,8 @@ void blankpackage(struct pkginfo *pigp) { pigp->installed.valid= 0; pigp->available.valid= 0; pigp->clientdata= 0; + blankpackageperfile(&pigp->installed); + blankpackageperfile(&pigp->available); } void blankpackageperfile(struct pkginfoperfile *pifp) { -- 2.39.5