1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

FTP: Test and fix handling of symbolic link name containing spaces

The bug was reported by Paul B. Mahol on elinks-users. The example is
from the FTP site he provided:

	ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-ia64/

Message-ID: <3a142e750802262008l6fd55be5v44207bc4479dd3fc@mail.gmail.com>
(cherry picked from commit c069403b75cdcbe3462f59969aaa4869ef548c26)
This commit is contained in:
Jonas Fonseca 2008-02-27 13:22:12 +01:00 committed by Kalle Olavi Niemitalo
parent 1ad9d5b2b8
commit 8bb0f20471
2 changed files with 6 additions and 1 deletions

View File

@ -346,7 +346,7 @@ parse_ftp_unix_response(struct ftp_file_info *info, unsigned char *src, int len)
break;
}
pos = memchr(pos, ' ', end - pos);
pos = memchr(pos + 1, ' ', end - pos);
}
if (!info->symlink.source)

View File

@ -61,6 +61,11 @@ test_ftp_response_expect_success \
"
-rwxrwxrwx 1 noone nogroup 322 Aug 19 1996 message.ftp\r\n"
test_ftp_response_expect_success \
'Response from FreeBSD with symbolic link' \
"
lrwxrwx--x 1 110 1002 13 Oct 24 2006 5.3 has moved to ftp-archive -> ../README.TXT\r\n"
test_ftp_response_expect_success \
'Response from NetWare' \
"