[Bug 2948] implement "copy-data" sftp extension
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Mon Dec 23 11:25:13 AEDT 2019
https://bugzilla.mindrot.org/show_bug.cgi?id=2948
--- Comment #6 from Darren Tucker <dtucker at dtucker.net> ---
Comment on attachment 3345
--> https://bugzilla.mindrot.org/attachment.cgi?id=3345
sftp client copy-data extension
[...]
>+.It Ic copy Ar oldpath Ar newpath
the man page says "copy" but the code says "cp". Personally I prefer
"cp".
[...]
> + } else {
>+ mode = 0666;
I'm not sure we should be making world writable files by default.
>+ if (old_handle == NULL) {
>+ sshbuf_free(msg);
>+ return -1;
>+ }
>+
>+ /* Open the new file for writing */
[...]
>+ if (new_handle == NULL) {
>+ sshbuf_free(msg);
>+ return -1;
+ }
I think this leaks old_handle if opening new_handle fails. It'd
probably be cleaner to initialise status and the handles to -1/NULL
then do a "goto out" and have all the cleanup in one place.
--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list