summaryrefslogtreecommitdiff
path: root/0001-sftp-seek-Don-t-flush-buffers-on-same-offset.patch
diff options
context:
space:
mode:
authorPaul Howarth <paul@city-fan.org>2015-03-11 10:30:38 +0000
committerPaul Howarth <paul@city-fan.org>2015-03-11 10:33:45 +0000
commit33cf9702d82652f637e94c5211ebb14e4edd3c3e (patch)
tree55bf100b539b16ed4282d55c8abac33bc2cc186a /0001-sftp-seek-Don-t-flush-buffers-on-same-offset.patch
parentResolves: #1147717 - prevent a not-connected agent from closing STDIN (diff)
downloadlibssh2-freefilesync-33cf9702d82652f637e94c5211ebb14e4edd3c3e.tar.gz
libssh2-freefilesync-33cf9702d82652f637e94c5211ebb14e4edd3c3e.tar.bz2
libssh2-freefilesync-33cf9702d82652f637e94c5211ebb14e4edd3c3e.zip
Update to 1.5.0
- New upstream release 1.5.0 - See RELEASE-NOTES for details of bug fixes and enhancements - Security Advisory for CVE-2015-1782, using SSH_MSG_KEXINIT data unbounded
Diffstat (limited to '0001-sftp-seek-Don-t-flush-buffers-on-same-offset.patch')
-rw-r--r--0001-sftp-seek-Don-t-flush-buffers-on-same-offset.patch54
1 files changed, 0 insertions, 54 deletions
diff --git a/0001-sftp-seek-Don-t-flush-buffers-on-same-offset.patch b/0001-sftp-seek-Don-t-flush-buffers-on-same-offset.patch
deleted file mode 100644
index 9acbd6d..0000000
--- a/0001-sftp-seek-Don-t-flush-buffers-on-same-offset.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 486bb376218a37fe15318d7724d6eada36b81e6c Mon Sep 17 00:00:00 2001
-From: "Richard W.M. Jones" <rjones@redhat.com>
-Date: Tue, 26 Mar 2013 17:58:04 +0100
-Subject: [PATCH 1/3] sftp: seek: Don't flush buffers on same offset
-
-Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
----
- src/sftp.c | 27 +++++++++++++++------------
- 1 file changed, 15 insertions(+), 12 deletions(-)
-
-diff --git a/src/sftp.c b/src/sftp.c
-index d0536dd..3760025 100644
---- a/src/sftp.c
-+++ b/src/sftp.c
-@@ -2132,21 +2132,24 @@ libssh2_sftp_fstat_ex(LIBSSH2_SFTP_HANDLE *hnd,
- LIBSSH2_API void
- libssh2_sftp_seek64(LIBSSH2_SFTP_HANDLE *handle, libssh2_uint64_t offset)
- {
-- if(handle) {
-- handle->u.file.offset = handle->u.file.offset_sent = offset;
-- /* discard all pending requests and currently read data */
-- sftp_packetlist_flush(handle);
-+ if(!handle)
-+ return;
-+ if(handle->u.file.offset == offset && handle->u.file.offset_sent == offset)
-+ return;
-
-- /* free the left received buffered data */
-- if (handle->u.file.data_left) {
-- LIBSSH2_FREE(handle->sftp->channel->session, handle->u.file.data);
-- handle->u.file.data_left = handle->u.file.data_len = 0;
-- handle->u.file.data = NULL;
-- }
-+ handle->u.file.offset = handle->u.file.offset_sent = offset;
-+ /* discard all pending requests and currently read data */
-+ sftp_packetlist_flush(handle);
-
-- /* reset EOF to False */
-- handle->u.file.eof = FALSE;
-+ /* free the left received buffered data */
-+ if (handle->u.file.data_left) {
-+ LIBSSH2_FREE(handle->sftp->channel->session, handle->u.file.data);
-+ handle->u.file.data_left = handle->u.file.data_len = 0;
-+ handle->u.file.data = NULL;
- }
-+
-+ /* reset EOF to False */
-+ handle->u.file.eof = FALSE;
- }
-
- /* libssh2_sftp_seek
---
-1.8.1.4
-
bgstack15