Review Request 120900: kio_sftp: Use the right type for timeout_sec and timeout_usec.
Raphael Kubo da Costa
rakuco at FreeBSD.org
Wed Oct 29 22:36:52 GMT 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120900/
-----------------------------------------------------------
Review request for KDE Runtime and Andreas Schneider.
Bugs: 331674
http://bugs.kde.org/show_bug.cgi?id=331674
Repository: kde-runtime
Description
-------
libssh expects the values passed to the SSH_OPTIONS_TIMEOUT and
SSH_OPTIONS_TIMEOUT_USEC to be longs, not plain ints.
On 64-bit platforms with sizeof(long) > sizeof(int), this mismatch can
be problematic and potentially result in invalid memory access that
causes the calls to ssh_options_set() to fail.
Diffs
-----
kioslave/sftp/kio_sftp.cpp 21cffac0e5892944ca6c5b74537ebc4b7fb4738e
Diff: https://git.reviewboard.kde.org/r/120900/diff/
Testing
-------
This is a bit hard to test, but with some tinkering in `sftpProtocol::sftpOpenConnection()` I can get `ssh_options_set()` to read parts of the argument passed to `sftpOpenConnection()` in addition to the actual value passed to `ssh_options_set()` and make the ioslave always say that it failed to set the timeout value.
With this change, everything works as expected.
Thanks,
Raphael Kubo da Costa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20141029/190bbe03/attachment.htm>
More information about the kde-core-devel
mailing list