[Pkg-wmaker-commits] [wmbiff] 06/14: oops, I left a use-after-free bug in the askpass code

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 20 03:03:59 UTC 2015


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

dtorrance-guest pushed a commit to tag wmbiff_0_4_17
in repository wmbiff.

commit 11c644d6c2e8b539101c8e3bc2d4784f437aa5ca
Author: bluehal <bluehal>
Date:   Sun Jul 20 00:44:17 2003 +0000

    oops, I left a use-after-free bug in the askpass code
---
 wmbiff/passwordMgr.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/wmbiff/passwordMgr.c b/wmbiff/passwordMgr.c
index 723ca00..c0bc99a 100644
--- a/wmbiff/passwordMgr.c
+++ b/wmbiff/passwordMgr.c
@@ -184,14 +184,17 @@ static void get_password_from_command(Pop3 pc, const char *username,
             exit(EXIT_FAILURE);
         }
         strncpy(password, password_ptr, *password_len);
-        free(password_ptr);
         if( password[*password_len-1] != '\0' ) {
             DM(pc, DEBUG_ERROR,
                "passmgr: warning: your password appears longer (%d) than expected (%d)\n", 
                strlen(password_ptr), *password_len - 1);
         }
+        free(password_ptr);
         password[*password_len-1] = '\0';
         *password_len = strlen(password);
+    } else {
+        DM(pc, DEBUG_ERROR,
+           "passmgr: permissions check of '%s' failed.", pc->askpass);
     }
 }
 

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



More information about the Pkg-wmaker-commits mailing list