From d8ef1fc56dc5e4d2248ca7f3ce8f43ee7f3a4a38 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sat, 12 Apr 2008 20:06:58 +0300 Subject: [PATCH] Fix a double-free by setting scontext to NULL after calling freecon Based on a patch by Russell Coker. Closes: #474339 --- ChangeLog | 5 +++++ THANKS | 1 + debian/changelog | 4 ++++ src/archives.c | 1 + 4 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 070378e6..6a0432fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-12 Russell Coker , + Guillem Jover + + * src/archives.c (tarobject): Set scontext to NULL after freecon. + 2008-04-10 Sven Joachim * src/trigcmd.c: Fix typo. diff --git a/THANKS b/THANKS index 073fc9cf..f1da8bae 100644 --- a/THANKS +++ b/THANKS @@ -142,6 +142,7 @@ Robert Luberda Robert Millan Roderick Schertler Roman Hodek +Russell Coker SZERVÁC Attila Samuel Thibault Scott Barker diff --git a/debian/changelog b/debian/changelog index dd7cb87d..175b3605 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,9 @@ dpkg (1.14.19) UNRELEASED; urgency=low + [ Guillem Jover ] + * Fix a double-free by setting scontext to NULL after calling freecon. + Based on a patch by Russell Coker. Closes: #474339 + [ Updated dpkg translations ] * Galician (Jacobo Tarrio). * German (Sven Joachim). diff --git a/src/archives.c b/src/archives.c index 023678fe..50ca0349 100644 --- a/src/archives.c +++ b/src/archives.c @@ -801,6 +801,7 @@ int tarobject(struct TarInfo *ti) { if(setfscreatecon(scontext) < 0) perror("Error setting security context for next file object:"); freecon(scontext); + scontext = NULL; } #endif /* WITH_SELINUX */ -- 2.39.5