commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 03/04: Fix use-after-free in libps.


From: Samuel Thibault
Subject: [hurd] 03/04: Fix use-after-free in libps.
Date: Sun, 28 Feb 2016 17:52:08 +0000

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

sthibault pushed a commit to branch upstream
in repository hurd.

commit 9019d6fc527882b8e09ca210e997b43a7b77c70f
Author: Esa Peuha <address@hidden>
Date:   Sat Feb 27 09:59:13 2016 +0200

    Fix use-after-free in libps.
    
    * libps/fmt.c (_fmt_create): Free new_fmt->src before new_fmt
    if reallocating fields fails.
---
 libps/fmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libps/fmt.c b/libps/fmt.c
index 580b097..f914212 100644
--- a/libps/fmt.c
+++ b/libps/fmt.c
@@ -80,8 +80,8 @@ _fmt_create (char *src, int posix, struct ps_fmt_specs 
*fmt_specs,
 
          if (fields == NULL)
            {
-             FREE (new_fmt);
              FREE (new_fmt->src);
+             FREE (new_fmt);
              return ENOMEM;
            }
 

-- 
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]