Archive Index
This month's Index
|
Subject: [libssh2] libssh2_scp_*: Whitespace in file names are not handled correctly
[libssh2] libssh2_scp_*: Whitespace in file names are not handled correctly
From: Heiner Steven <heiner.steven_at_nexgo.de>
Date: Thu, 08 May 2008 09:57:16 +0200
Hello,
it seems that some libssh2 SCP functions do not correctly handle
The reason is that libssh2 builds a "scp" command line that will be
scp -f with blanks
instead of (note the quotation marks):
scp -f 'with blanks'
The code causing problems is in libssh2_scp_recv():
memcpy(session->scpRecv_command, "scp -f ", sizeof("scp -f ") - 1);
(Similar code is in libssh2_scp_send()).
Variable "path" should get correct quoting.
I attached the function shell_quotearg() that could be used for quoting
Greetings
Heiner
-------------------------------------------------------------------------
_______________________________________________
|