1
1

SCP: allow file names with bytes > 126

When parsing the SCP protocol and verifying that the data looks like a
valid file name, byte values over 126 must not be consider illegal since
UTF-8 file names will use such codes.

Reported by: Uli Zappe
Bug: http://www.libssh2.org/mail/libssh2-devel-archive-2010-08/0112.shtml
Этот коммит содержится в:
Daniel Stenberg 2010-08-31 19:56:00 +02:00
родитель eec7f2fb63
Коммит 018602cb34

Просмотреть файл

@ -621,11 +621,9 @@ scp_recv(LIBSSH2_SESSION * session, const char *path, struct stat * sb)
scpRecv_response[session->scpRecv_response_len - 1] !=
'\n')
&&
((session->
scpRecv_response[session->scpRecv_response_len - 1] < 32)
|| (session->
scpRecv_response[session->scpRecv_response_len - 1] >
126))) {
(session->
scpRecv_response[session->scpRecv_response_len - 1]
< 32)) {
_libssh2_error(session, LIBSSH2_ERROR_SCP_PROTOCOL,
"Invalid data in SCP response");
goto scp_recv_error;