The following commit has been merged in the master branch:
commit d8ef1fc56dc5e4d2248ca7f3ce8f43ee7f3a4a38
Author: Guillem Jover <[EMAIL PROTECTED]>
Date:   Sat Apr 12 20:06:58 2008 +0300

    Fix a double-free by setting scontext to NULL after calling freecon
    
    Based on a patch by Russell Coker. Closes: #474339

diff --git a/ChangeLog b/ChangeLog
index 070378e..6a0432f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-12  Russell Coker <[EMAIL PROTECTED]>,
+            Guillem Jover  <[EMAIL PROTECTED]>
+
+       * src/archives.c (tarobject): Set scontext to NULL after freecon.
+
 2008-04-10  Sven Joachim  <[EMAIL PROTECTED]>
 
        * src/trigcmd.c: Fix typo.
diff --git a/THANKS b/THANKS
index 073fc9c..f1da8ba 100644
--- a/THANKS
+++ b/THANKS
@@ -142,6 +142,7 @@ Robert Luberda <[EMAIL PROTECTED]>
 Robert Millan <[EMAIL PROTECTED]>
 Roderick Schertler <[EMAIL PROTECTED]>
 Roman Hodek <[EMAIL PROTECTED]>
+Russell Coker <[EMAIL PROTECTED]>
 SZERVÁC Attila <[EMAIL PROTECTED]>
 Samuel Thibault <[EMAIL PROTECTED]>
 Scott Barker <[EMAIL PROTECTED]>
diff --git a/debian/changelog b/debian/changelog
index dd7cb87..175b360 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 023678f..50ca034 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 */

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to