simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Thu Dec 27 16:56:39 GMT 2018
TL;DR:
85fbb421 pscp: replace crash with diagnostic on opendir failure.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2018-12-27 16:56:39
commit 85fbb4216e37f96a67267106dfe77d9e377b34f3
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=85fbb4216e37f96a67267106dfe77d9e377b34f3;hp=3322d4c082455f228e20a4d5553bc4b3448deb92
Author: Simon Tatham <anakin at pobox.com>
Date: Thu Dec 27 16:52:23 2018 +0000
pscp: replace crash with diagnostic on opendir failure.
A user points out that the call to close_directory() in pscp.c's
rsource() function should have been inside rather than outside the if
statement that checks whether the directory handle is NULL. As a
result, any failed attempt to open a directory during a 'pscp -r'
recursive upload leads to a null-pointer dereference.
Moved the close_directory call to where it should be, and also
arranged to print the OS error code if the directory-open fails, by
also changing the API of open_directory to return an error string on
failure.
pscp.c | 7 +++++--
psftp.c | 5 +++--
psftp.h | 2 +-
unix/uxsftp.c | 6 ++++--
windows/winsftp.c | 6 ++++--
5 files changed, 17 insertions(+), 9 deletions(-)
More information about the tartarus-commits
mailing list