aboutsummaryrefslogtreecommitdiff
path: root/libssh/scp.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-08-24 16:07:45 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2009-08-24 16:07:45 +0200
commit16d1ef8933c6b3a2a578088bed650db160b129ea (patch)
tree0563ad9c5f8a104c2e74835da5a73f333db81bbc /libssh/scp.c
parentaef947121778131a94de4540a56adc0d02b0f04a (diff)
downloadlibssh-16d1ef8933c6b3a2a578088bed650db160b129ea.tar.gz
libssh-16d1ef8933c6b3a2a578088bed650db160b129ea.tar.xz
libssh-16d1ef8933c6b3a2a578088bed650db160b129ea.zip
buffer initialization change
Diffstat (limited to 'libssh/scp.c')
-rw-r--r--libssh/scp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libssh/scp.c b/libssh/scp.c
index 4f73f18..ab2e086 100644
--- a/libssh/scp.c
+++ b/libssh/scp.c
@@ -165,14 +165,13 @@ int ssh_scp_push_directory(ssh_scp scp, const char *dirname, const char *perms){
* @see ssh_scp_push_directory
*/
int ssh_scp_leave_directory(ssh_scp scp){
- char buffer[1024];
+ char buffer[]="E\n";
int r;
uint8_t code;
if(scp->state != SSH_SCP_WRITE_INITED){
ssh_set_error(scp->session,SSH_FATAL,"ssh_scp_leave_directory called under invalid state");
return SSH_ERROR;
}
- strcpy(buffer, "E\n");
r=channel_write(scp->channel,buffer,strlen(buffer));
if(r==SSH_ERROR){
scp->state=SSH_SCP_ERROR;