summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-12 00:21:34 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-12 00:21:34 +0000
commit88259fbbc59253224aa5d0124eeab0b34140d985 (patch)
tree27f6a2354e18e0d08b1cf9e1f742e88ff87478b3
parent0a0c3a63d07c1db46642f97d964494e3a6407f0a (diff)
- markus@cvs.openbsd.org 2001/06/11 10:18:24
[session.c] reset pointer to NULL after xfree(); report from solar@openwall.com
-rw-r--r--ChangeLog5
-rw-r--r--session.c11
2 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 72ad70a8..2ddcce02 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
[dispatch.c]
we support rekeying
protocol errors are fatal.
+ - markus@cvs.openbsd.org 2001/06/11 10:18:24
+ [session.c]
+ reset pointer to NULL after xfree(); report from solar@openwall.com
20010611
- (bal) NeXT/MacOS X lack libgen.h and dirname(). Patch by Mark Miller
@@ -5610,4 +5613,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1278 2001/06/12 00:15:57 mouring Exp $
+$Id: ChangeLog,v 1.1279 2001/06/12 00:21:34 mouring Exp $
diff --git a/session.c b/session.c
index 9f472a22..4dfca357 100644
--- a/session.c
+++ b/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"
@@ -364,6 +364,8 @@ do_authenticated1(Authctxt *authctxt)
if (!success) {
xfree(s->auth_proto);
xfree(s->auth_data);
+ s->auth_proto = NULL;
+ s->auth_data = NULL;
}
break;
@@ -1047,7 +1049,7 @@ 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;
#ifdef WITH_IRIX_PROJECT
prid_t projid;
#endif /* WITH_IRIX_PROJECT */
@@ -1059,6 +1061,9 @@ do_child(Session *s, const char *command)
#endif /* WITH_IRIX_ARRAY */
#endif /* WITH_IRIX_JOBS */
+ do_xauth =
+ s->display != NULL && s->auth_proto != NULL && s->auth_data != NULL;
+
/* remove hostkey from the child's memory */
destroy_sensitive_data();
@@ -1731,6 +1736,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;
}