https://bugzilla.mindrot.org/show_bug.cgi?id=2948

--- Comment #6 from Darren Tucker <[email protected]> ---
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.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to