summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-12-09 14:12:05 +1100
committerDamien Miller <djm@mindrot.org>2008-12-09 14:12:05 +1100
commit0d772d9d11ceedd9432383019a75859813149673 (patch)
tree67a0d7fe3ad1f90e6a56243c82442332ebf0fd7b
parent1be2cc44961177897c3380ed7a8ec3641d5fd8ad (diff)
- djm@cvs.openbsd.org 2008/12/09 02:58:16
[readconf.c] don't leave junk (free'd) pointers around in Forward *fwd argument on failure; avoids double-free in ~C -L handler when given an invalid forwarding specification; bz#1539 report from adejong AT debian.org via Colin Watson; ok markus@ dtucker@
-rw-r--r--ChangeLog8
-rw-r--r--readconf.c10
2 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ea6a05da..ab50a006a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,12 @@
12 Deal correctly with failures in remote stat() operation in sftp, 12 Deal correctly with failures in remote stat() operation in sftp,
13 correcting fail-on-error behaviour in batchmode. bz#1541 report and 13 correcting fail-on-error behaviour in batchmode. bz#1541 report and
14 fix from anedvedicky AT gmail.com; ok markus@ 14 fix from anedvedicky AT gmail.com; ok markus@
15 - djm@cvs.openbsd.org 2008/12/09 02:58:16
16 [readconf.c]
17 don't leave junk (free'd) pointers around in Forward *fwd argument on
18 failure; avoids double-free in ~C -L handler when given an invalid
19 forwarding specification; bz#1539 report from adejong AT debian.org
20 via Colin Watson; ok markus@ dtucker@
15 21
1620081208 2220081208
17 - (djm) [configure.ac] bz#1538: better test for ProPolice/SSP: actually 23 - (djm) [configure.ac] bz#1538: better test for ProPolice/SSP: actually
@@ -4979,5 +4985,5 @@
4979 OpenServer 6 and add osr5bigcrypt support so when someone migrates 4985 OpenServer 6 and add osr5bigcrypt support so when someone migrates
4980 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 4986 passwords between UnixWare and OpenServer they will still work. OK dtucker@
4981 4987
4982$Id: ChangeLog,v 1.5153 2008/12/09 03:11:49 djm Exp $ 4988$Id: ChangeLog,v 1.5154 2008/12/09 03:12:05 djm Exp $
4983 4989
diff --git a/readconf.c b/readconf.c
index d1ffd84a8..ab89e0c05 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.172 2008/11/04 19:18:00 stevesk Exp $ */ 1/* $OpenBSD: readconf.c,v 1.173 2008/12/09 02:58:16 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1293,9 +1293,13 @@ parse_forward(Forward *fwd, const char *fwdspec, int dynamicfwd)
1293 return (i); 1293 return (i);
1294 1294
1295 fail_free: 1295 fail_free:
1296 if (fwd->connect_host != NULL) 1296 if (fwd->connect_host != NULL) {
1297 xfree(fwd->connect_host); 1297 xfree(fwd->connect_host);
1298 if (fwd->listen_host != NULL) 1298 fwd->connect_host = NULL;
1299 }
1300 if (fwd->listen_host != NULL) {
1299 xfree(fwd->listen_host); 1301 xfree(fwd->listen_host);
1302 fwd->listen_host = NULL;
1303 }
1300 return (0); 1304 return (0);
1301} 1305}