Module Name: src
Committed By: christos
Date: Tue Nov 19 16:58:16 UTC 2013
Modified Files:
src/crypto/external/bsd/openssh/dist: sftp-client.c
Log Message:
CID 1129615: close argument can't be negative
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/crypto/external/bsd/openssh/dist/sftp-client.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/external/bsd/openssh/dist/sftp-client.c
diff -u src/crypto/external/bsd/openssh/dist/sftp-client.c:1.10 src/crypto/external/bsd/openssh/dist/sftp-client.c:1.11
--- src/crypto/external/bsd/openssh/dist/sftp-client.c:1.10 Mon Nov 11 11:46:20 2013
+++ src/crypto/external/bsd/openssh/dist/sftp-client.c Tue Nov 19 11:58:16 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: sftp-client.c,v 1.10 2013/11/11 16:46:20 christos Exp $ */
+/* $NetBSD: sftp-client.c,v 1.11 2013/11/19 16:58:16 christos Exp $ */
/* $OpenBSD: sftp-client.c,v 1.101.2.1 2013/11/08 01:33:56 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <[email protected]>
@@ -22,7 +22,7 @@
/* XXX: copy between two remote sites */
#include "includes.h"
-__RCSID("$NetBSD: sftp-client.c,v 1.10 2013/11/11 16:46:20 christos Exp $");
+__RCSID("$NetBSD: sftp-client.c,v 1.11 2013/11/19 16:58:16 christos Exp $");
#include <sys/types.h>
#include <sys/poll.h>
#include <sys/queue.h>
@@ -1069,7 +1069,8 @@ do_download(struct sftp_conn *conn, char
do_close(conn, handle, handle_len);
buffer_free(&msg);
free(handle);
- close(local_fd);
+ if (local_fd != -1)
+ close(local_fd);
return -1;
}
offset = highwater = st.st_size;