summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-08-30 11:07:39 +1000
committerDamien Miller <djm@mindrot.org>2006-08-30 11:07:39 +1000
commitd5fe0baa73a168a1194b311aeff9fd824b038740 (patch)
tree6a92d496be41d45e7a82a4651cc7907fe9449311
parent5d43d4901496159611ab7b431caf9a9c08ecbdcd (diff)
- djm@cvs.openbsd.org 2006/08/29 10:40:19
[channels.c session.c] normalise some inconsistent (but harmless) NULL pointer checks spotted by the Stanford SATURN tool, via Isil Dillig; ok markus@ deraadt@
-rw-r--r--ChangeLog7
-rw-r--r--channels.c6
-rw-r--r--session.c13
3 files changed, 15 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 200ce2a0..866960a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,11 @@
[sshd.8]
Add more detail about what permissions are and aren't accepted for
authorized_keys files. Corrections jmc@, ok djm@, "looks good" jmc@
+ - djm@cvs.openbsd.org 2006/08/29 10:40:19
+ [channels.c session.c]
+ normalise some inconsistent (but harmless) NULL pointer checks
+ spotted by the Stanford SATURN tool, via Isil Dillig;
+ ok markus@ deraadt@
20060824
- (dtucker) [openbsd-compat/basename.c] Include errno.h.
@@ -5310,4 +5315,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.4512 2006/08/30 01:07:00 djm Exp $
+$Id: ChangeLog,v 1.4513 2006/08/30 01:07:39 djm Exp $
diff --git a/channels.c b/channels.c
index dfa1e591..26b63a1a 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.265 2006/08/03 03:34:41 deraadt Exp $ */
+/* $OpenBSD: channels.c,v 1.266 2006/08/29 10:40:18 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -3164,9 +3164,7 @@ x11_request_forwarding_with_spoofing(int client_session_id, const char *disp,
return;
}
- cp = disp;
- if (disp)
- cp = strchr(disp, ':');
+ cp = strchr(disp, ':');
if (cp)
cp = strchr(cp, '.');
if (cp)
diff --git a/session.c b/session.c
index 057298c8..006e4304 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.218 2006/08/18 09:15:20 markus Exp $ */
+/* $OpenBSD: session.c,v 1.219 2006/08/29 10:40:19 djm Exp $ */
/*
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -2255,12 +2255,13 @@ session_close(Session *s)
if (s->auth_proto)
xfree(s->auth_proto);
s->used = 0;
- for (i = 0; i < s->num_env; i++) {
- xfree(s->env[i].name);
- xfree(s->env[i].val);
- }
- if (s->env != NULL)
+ if (s->env != NULL) {
+ for (i = 0; i < s->num_env; i++) {
+ xfree(s->env[i].name);
+ xfree(s->env[i].val);
+ }
xfree(s->env);
+ }
session_proctitle(s);
}