simon-git: putty (master): putty.git
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Thu Dec 29 11:35:21 GMT 2016
TL;DR:
57e21d7 Fix sftp_get_file returning success on failed transfers.
e9a7688 Fix sftp_put_file returning success on failed transfers.
6f871e3 Handle failed SSH_FXP_CLOSE requests in sftp_put_file.
fa38307 In random_add_noise, put the hashed noise into the pool, not the raw noise
86ba2e6 Remove/rescope variable 'ret' in sftp_put_file.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer: putty.git
Date: 2016-12-29 11:35:21
commit 57e21d756e22c0f80a8dbccfdbda761aeedfca2f
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=57e21d756e22c0f80a8dbccfdbda761aeedfca2f;hp=24a43404b4335a9c037746bc73fab3ffbd4875e1
Author: Tim Kosse <tim.kosse at filezilla-project.org>
Date: Wed Dec 28 14:59:49 2016 +0100
Fix sftp_get_file returning success on failed transfers.
Due to the return variable 'ret' being shadowed in the transfer loop, errors
in the transfer loop did not affect the final return value of sftp_get_file.
This particularly affects psftp's batch mode (without passing the -be
command-line argument), which would errorneously continue. The solution is
to simply remove the shadowing declaration.
psftp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit e9a76883adf4f36ff467441f365becc392e48f30
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=e9a76883adf4f36ff467441f365becc392e48f30;hp=57e21d756e22c0f80a8dbccfdbda761aeedfca2f
Author: Tim Kosse <tim.kosse at filezilla-project.org>
Date: Wed Dec 28 15:27:47 2016 +0100
Fix sftp_put_file returning success on failed transfers.
Due to a shadowed variable, transfer failures were not reflected in the return
code to sftp_put_file. Instead of tracking the return code, use the 'err'
variable to decide which return code to use.
psftp.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
commit 6f871e3d226bc837e98b59649d323c6df5fc7f8a
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=6f871e3d226bc837e98b59649d323c6df5fc7f8a;hp=e9a76883adf4f36ff467441f365becc392e48f30
Author: Tim Kosse <tim.kosse at filezilla-project.org>
Date: Wed Dec 28 15:34:53 2016 +0100
Handle failed SSH_FXP_CLOSE requests in sftp_put_file.
It is possible for SSH_FXP_CLOSE requests to fail. This can happen if the
server buffers writes and an error occurs flushing the data to disk while
processing the SSH_FXP_CLOSE request. If the close fails, sftp_put_file now
returns an error as well.
psftp.c | 8 +++++++-
sftp.c | 3 ++-
sftp.h | 4 ++--
3 files changed, 11 insertions(+), 4 deletions(-)
commit fa383072440a3ae6f6cf3ad5e024750d973ccb07
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=fa383072440a3ae6f6cf3ad5e024750d973ccb07;hp=6f871e3d226bc837e98b59649d323c6df5fc7f8a
Author: Tim Kosse <tim.kosse at filezilla-project.org>
Date: Wed Dec 28 15:41:40 2016 +0100
In random_add_noise, put the hashed noise into the pool, not the raw noise
random_add_noise calls SHATransform for every 64 octets of incoming noise,
yet instead of xor'ing the hashed noise into the pool it instead only xor'ed
20 octets of the raw noise in each iteration. This effectively reduced the
amount of new entropy entering the pool.
sshrand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 86ba2e63392de207eb02916ba83af17af755c840
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=86ba2e63392de207eb02916ba83af17af755c840;hp=fa383072440a3ae6f6cf3ad5e024750d973ccb07
Author: Simon Tatham <anakin at pobox.com>
Date: Thu Dec 29 11:25:34 2016 +0000
Remove/rescope variable 'ret' in sftp_put_file.
This is a purely stylistic cleanup - no functional change intended -
after Tim Kosse's changes in commits e9a76883a and 6f871e3d2.
I think the underlying cause of the confusion whose functional effects
he was fixing there is that I have the bad habit of tending to call
variables 'ret' for two different reasons: one is because it's holding
the value returned from some subroutine I've just called, and the
other is because it's holding the value I'm preparing to return from
the routine _containing_ the variable.
The reason it's a bad habit is that I confuse the two purposes, and a
variable of one type ends up accidentally being treated as the other.
So while Tim's commits have already fixed the functional effects of
the error in this case, this change should help prevent a recurrence
because now there's no variable called 'ret' at all that's in scope
for the whole function.
psftp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
More information about the tartarus-commits
mailing list