summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-11-03 19:22:09 +1100
committerDamien Miller <djm@mindrot.org>2008-11-03 19:22:09 +1100
commitc4d1b36cc2fb89566fe01b990abf8b635e0dce74 (patch)
treef0c9f2c8c52ec453241aa2f34ceb937566f2b620
parent49b78d4fbc138a252fc083c67d6b3750477d92a1 (diff)
aadt@cvs.openbsd.org 2008/10/03 23:56:28
[sshconnect2.c] Repair strnvis() buffersize of 4*n+1, with termination gauranteed by the function. spotted by des@freebsd, who commited an incorrect fix to the freebsd tree and (as is fairly typical) did not report the problem to us. But this fix is correct. ok djm
-rw-r--r--ChangeLog10
-rw-r--r--sshconnect2.c6
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 5da1ee434..81c6ef9b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,14 @@
39 do not give an example of how to chmod files: we can presume the user 39 do not give an example of how to chmod files: we can presume the user
40 knows that. removes an ambiguity in the permission of authorized_keys; 40 knows that. removes an ambiguity in the permission of authorized_keys;
41 ok deraadt 41 ok deraadt
42 - deraadt@cvs.openbsd.org 2008/10/03 23:56:28
43 [sshconnect2.c]
44 Repair strnvis() buffersize of 4*n+1, with termination gauranteed by the
45 function.
46 spotted by des@freebsd, who commited an incorrect fix to the freebsd tree
47 and (as is fairly typical) did not report the problem to us. But this fix
48 is correct.
49 ok djm
42 50
4320080906 5120080906
44 - (dtucker) [config.guess config.sub] Update to latest versions from 52 - (dtucker) [config.guess config.sub] Update to latest versions from
@@ -4773,4 +4781,4 @@
4773 OpenServer 6 and add osr5bigcrypt support so when someone migrates 4781 OpenServer 6 and add osr5bigcrypt support so when someone migrates
4774 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 4782 passwords between UnixWare and OpenServer they will still work. OK dtucker@
4775 4783
4776$Id: ChangeLog,v 1.5108 2008/11/03 08:21:21 djm Exp $ 4784$Id: ChangeLog,v 1.5109 2008/11/03 08:22:09 djm Exp $
diff --git a/sshconnect2.c b/sshconnect2.c
index 1a8f39071..fe9285f17 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.167 2008/07/31 14:48:28 markus Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.168 2008/10/03 23:56:28 deraadt Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -386,8 +386,8 @@ input_userauth_banner(int type, u_int32_t seq, void *ctxt)
386 if (len > 0 && options.log_level >= SYSLOG_LEVEL_INFO) { 386 if (len > 0 && options.log_level >= SYSLOG_LEVEL_INFO) {
387 if (len > 65536) 387 if (len > 65536)
388 len = 65536; 388 len = 65536;
389 msg = xmalloc(len * 4); /* max expansion from strnvis() */ 389 msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */
390 strnvis(msg, raw, len * 4, VIS_SAFE|VIS_OCTAL); 390 strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL);
391 fprintf(stderr, "%s", msg); 391 fprintf(stderr, "%s", msg);
392 xfree(msg); 392 xfree(msg);
393 } 393 }