on and trying to transfer files, which caused a null-pointer deference.
Thanks to Fernando Najera for reporting the bug.
git-svn-id: svn://svn.tartarus.org/sgt/putty@6021
cda61777-01e9-0310-a592-
d414129be87e
static struct fxp_xfer *scp_sftp_xfer;
static uint64 scp_sftp_fileoffset;
static struct fxp_xfer *scp_sftp_xfer;
static uint64 scp_sftp_fileoffset;
-void scp_source_setup(char *target, int shouldbedir)
+int scp_source_setup(char *target, int shouldbedir)
if (!fxp_init()) {
tell_user(stderr, "unable to initialise SFTP: %s", fxp_error());
errs++;
if (!fxp_init()) {
tell_user(stderr, "unable to initialise SFTP: %s", fxp_error());
errs++;
}
sftp_register(req = fxp_stat_send(target));
}
sftp_register(req = fxp_stat_send(target));
} else {
(void) response();
}
} else {
(void) response();
}
}
int scp_send_errmsg(char *str)
}
int scp_send_errmsg(char *str)
do_cmd(host, user, cmd);
sfree(cmd);
do_cmd(host, user, cmd);
sfree(cmd);
- scp_source_setup(targ, targetshouldbedirectory);
+ if (scp_source_setup(targ, targetshouldbedirectory))
+ return;
for (i = 0; i < argc - 1; i++) {
src = argv[i];
for (i = 0; i < argc - 1; i++) {
src = argv[i];