commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 38/87: trans/fakeroot: fix error handling


From: Samuel Thibault
Subject: [hurd] 38/87: trans/fakeroot: fix error handling
Date: Sun, 09 Nov 2014 11:05:02 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 470972f3f854e92ee1cc8f1e2ada8412a2b97956
Author: Justus Winter <address@hidden>
Date:   Mon Jun 16 16:50:12 2014 +0200

    trans/fakeroot: fix error handling
    
    Found using the Clang Static Analyzer.
    
    * trans/fakeroot.c (new_node): Do not leak a pointer to freed memory.
    Store NULL at *np instead.  This fixes a node use-after-free in
    netfs_S_dir_lookup.
---
 trans/fakeroot.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 32a34ec..df2de64 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -119,6 +119,7 @@ new_node (file_t file, mach_port_t idport, int locked, int 
openmodes,
   mach_port_deallocate (mach_task_self (), nn->idport);
   mach_port_deallocate (mach_task_self (), file);
   free (*np);
+  *np = NULL;
   return err;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]