can function sftp_upload return OK even if an error message is received?

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Hi,

With reference to the latest version of the portable OpenSSH, in file sftp-client.c, it looks to me there may be a bug in function sftp_upload.

My understanding is that, when variable "len" is equal to 0, no more SSH_FXP_WRITE messages are sent out and you start draining the queue of pending responses. Variable "len" is set to 0 either when the upload is interrupted, or when the SSH_FXP_STATUS response message carries an error, which sets variable "status" to a value different from SSH_FX_OK.

Can the variable "status" be overwritten by subsequent response messages to be again SSH_FX_OK? And, if this is the case, isn't it that the "read" is again called, variable "len" is set again to a non-zero value, and thus the function can return 0 even if an error message was received?

Kind regards,
Graziano Stefani.


_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux