1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-22 14:39:24 -05:00

Patches to prevent a couple of silly crashes

[originally from svn r954]
This commit is contained in:
Simon Tatham 2001-02-27 09:11:42 +00:00
parent b10bc57b03
commit 2b8ab6082f
2 changed files with 5 additions and 0 deletions

View File

@ -590,6 +590,7 @@ void do_sftp(void) {
fprintf(stderr, fprintf(stderr,
"Fatal: unable to initialise SFTP: %s\n", "Fatal: unable to initialise SFTP: %s\n",
fxp_error()); fxp_error());
return;
} }
/* /*

4
sftp.c
View File

@ -286,6 +286,10 @@ int fxp_init(void) {
sftp_send(pktout); sftp_send(pktout);
pktin = sftp_recv(); pktin = sftp_recv();
if (!pktin) {
fxp_internal_error("could not connect");
return 0;
}
if (pktin->type != SSH_FXP_VERSION) { if (pktin->type != SSH_FXP_VERSION) {
fxp_internal_error("did not receive FXP_VERSION"); fxp_internal_error("did not receive FXP_VERSION");
return 0; return 0;