diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-06-11 10:18:25 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-06-11 10:18:25 +0000 |
commit | f27a816ffce4d647f5f7bbfe796f9a81aaacb8de (patch) | |
tree | 6eac0f1479acbd24674ac3c363f4a2d2ad648e4f /usr.bin/ssh/session.c | |
parent | 2661edd5e2d7a0106c9507f4de4c44d6fbe5102d (diff) |
reset pointer to NULL after xfree(); report from solar@openwall.com
Diffstat (limited to 'usr.bin/ssh/session.c')
-rw-r--r-- | usr.bin/ssh/session.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index 92ff0553dad..c9adf58853c 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.83 2001/06/07 22:25:02 markus Exp $"); +RCSID("$OpenBSD: session.c,v 1.84 2001/06/11 10:18:24 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -321,6 +321,8 @@ do_authenticated1(Authctxt *authctxt) if (!success) { xfree(s->auth_proto); xfree(s->auth_data); + s->auth_proto = NULL; + s->auth_data = NULL; } break; @@ -797,7 +799,10 @@ do_child(Session *s, const char *command) extern char **environ; struct stat st; char *argv[10]; - int do_xauth = s->auth_proto != NULL && s->auth_data != NULL; + int do_xauth; + + do_xauth = + s->display != NULL && s->auth_proto != NULL && s->auth_data != NULL; /* remove hostkey from the child's memory */ destroy_sensitive_data(); @@ -1353,6 +1358,8 @@ session_x11_req(Session *s) if (!success) { xfree(s->auth_proto); xfree(s->auth_data); + s->auth_proto = NULL; + s->auth_data = NULL; } return success; } |