1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-26 01:03:15 +03:00
Jakub Jelen ae3825dfb2 sftp: Avoid race condition reading incomplete data messages
This changes amends f561e6bcb3 which
introduces same check in one place, but miss it in other two places.

We encountered this issue with qemu using SFTP to transfer large
data chunks and in some cases, the file transfer was interrupted
without any reason. From the debug messages, it showed up that
last part of data message/packet was not handled in the time
of the sftp_read() call, therefore the ssh_channel_read() returned
zero (there was no more data to read yet), which made the whole
transfer fail hard instead of retrying later.

The proposed change is reusing the code from previously referenced
commit also in the other places.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-27 09:29:24 +02:00
2018-08-24 14:58:52 +02:00
2018-08-08 20:58:23 +02:00
2017-08-21 09:12:36 +02:00
2014-01-07 16:08:23 +01:00
2018-08-10 12:20:57 +02:00
2018-08-10 14:18:18 +02:00
2018-06-29 16:22:59 +02:00
2018-08-13 13:44:58 +02:00
2016-05-02 11:55:39 +02:00
2017-02-27 11:49:10 +01:00

pipeline status

  _   _   _                          _
 (_) (_) (_)                        (_)
 (_)  _  (_) _         _  _   _  _  (_) _
 (_) (_) (_)(_) _     (_)(_) (_)(_) (_)(_) _
 (_) (_) (_)   (_)  _ (_)  _ (_)    (_)   (_)
 (_) (_) (_)(_)(_) (_)(_) (_)(_)    (_)   (_).org

 The SSH library

Why?

Why not ? :) I've began to work on my own implementation of the ssh protocol because i didn't like the currently public ones. Not any allowed you to import and use the functions as a powerful library, and so i worked on a library-based SSH implementation which was non-existing in the free and open source software world.

How/Who?

If you downloaded this file, you must know what it is : a library for accessing ssh client services through C libraries calls in a simple manner. Everybody can use this software under the terms of the LGPL - see the COPYING file

If you ask yourself how to compile libssh, please read INSTALL before anything.

Where ?

https://www.libssh.org

Contributing

Please read the file 'SubmittingPatches' next to this README file. It explains our copyright policy and how you should send patches for upstream inclusion.

Have fun and happy libssh hacking!

The libssh Team

Description
libssh - это мультиплатформенная библиотека C, реализующая протокол SSHv2 на стороне клиента и сервера
Readme 14 MiB
Languages
C 95.1%
CMake 4.2%
C++ 0.5%
Shell 0.2%