From 495663165f9ef1583249e690a8f654b312fbd40e Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 26 Jun 2010 09:38:23 +1000 Subject: - djm@cvs.openbsd.org 2010/06/18 04:43:08 [sftp-client.c] fix memory leak in do_realpath() error path; bz#1771, patch from anicka AT suse.cz --- sftp-client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sftp-client.c') diff --git a/sftp-client.c b/sftp-client.c index 6124c0f40..408b29840 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.90 2009/10/11 10:41:26 dtucker Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.91 2010/06/18 04:43:08 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -713,7 +713,8 @@ do_realpath(struct sftp_conn *conn, char *path) u_int status = buffer_get_int(&msg); error("Couldn't canonicalise: %s", fx2txt(status)); - return(NULL); + buffer_free(&msg); + return NULL; } else if (type != SSH2_FXP_NAME) fatal("Expected SSH2_FXP_NAME(%u) packet, got %u", SSH2_FXP_NAME, type); -- cgit v1.2.3 From c4bb91c79c0a05d2bbf2ac68b7be8421fb4957bf Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 3 Aug 2010 16:04:22 +1000 Subject: - djm@cvs.openbsd.org 2010/07/19 03:16:33 [sftp-client.c] bz#1797: fix swapped args in upload_dir_internal(), breaking recursive upload depth checks and causing verbose printing of transfers to always be turned on; patch from imorgan AT nas.nasa.gov --- ChangeLog | 5 +++++ sftp-client.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'sftp-client.c') diff --git a/ChangeLog b/ChangeLog index 0d51580fd..f4fb5f05f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,11 @@ more timing paranoia - compare all parts of the expected decrypted data before returning. AFAIK not exploitable in the SSH protocol. "groovy" deraadt@ + - djm@cvs.openbsd.org 2010/07/19 03:16:33 + [sftp-client.c] + bz#1797: fix swapped args in upload_dir_internal(), breaking recursive + upload depth checks and causing verbose printing of transfers to always + be turned on; patch from imorgan AT nas.nasa.gov 20100819 - (dtucker) [contrib/ssh-copy-ud.1] Bug #1786: update ssh-copy-id.1 with more diff --git a/sftp-client.c b/sftp-client.c index 408b29840..9dab47780 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.91 2010/06/18 04:43:08 djm Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.92 2010/07/19 03:16:33 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -1523,7 +1523,7 @@ upload_dir_internal(struct sftp_conn *conn, char *src, char *dst, continue; if (upload_dir_internal(conn, new_src, new_dst, - pflag, depth + 1, printflag) == -1) + pflag, printflag, depth + 1) == -1) ret = -1; } else if (S_ISREG(sb.st_mode)) { if (do_upload(conn, new_src, new_dst, pflag) == -1) { -- cgit v1.2.3