Paul B. Mahol <[EMAIL PROTECTED]> wrote Wed, Feb 27, 2008:
> Summary: elinks locks on ftp symbolic link
> 
> check for example ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-ia64/

Thank you for reporting and providing the example. I have commited a fix
to the elinks-0.11 branch, so it will be in the next stable release.

The patch is attached below in case you are interested.
---
 src/protocol/ftp/parse.c         |    2 +-
 src/protocol/ftp/test-ftp-parser |    5 +++++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/protocol/ftp/parse.c b/src/protocol/ftp/parse.c
index be4326e..8048406 100644
--- a/src/protocol/ftp/parse.c
+++ b/src/protocol/ftp/parse.c
@@ -345,7 +345,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)
diff --git a/src/protocol/ftp/test-ftp-parser b/src/protocol/ftp/test-ftp-parser
index 860056d..370e223 100644
--- a/src/protocol/ftp/test-ftp-parser
+++ b/src/protocol/ftp/test-ftp-parser
@@ -62,6 +62,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' \
 "
 d[R----F--] supervisor            512       Jan 16 18:53    login\r\n
-- 
1.5.4.2.1353.g94e17

-- 
Jonas Fonseca
_______________________________________________
elinks-users mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-users

Reply via email to