From 2e48de2b01f42ddef8dafd8bbe88aa80eec574b4 Mon Sep 17 00:00:00 2001
From: hniksic <devnull@localhost>
Date: Thu, 24 Feb 2005 05:44:19 -0800
Subject: [PATCH] [svn] Fix infloop in ftp_expected_bytes introduced by the LFS
 patch.

---
 src/ChangeLog | 5 +++++
 src/ftp.c     | 1 +
 2 files changed, 6 insertions(+)

diff --git a/src/ChangeLog b/src/ChangeLog
index f4fb7a16..49af189e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
+
+	* ftp.c (ftp_expected_bytes): Fix bug that caused infloop because
+	of not correctly skipping the '(' character.
+
 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
 
 	* mswindows.c (wget_ftello): Removed.
diff --git a/src/ftp.c b/src/ftp.c
index 3f121a1b..838f1410 100644
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -96,6 +96,7 @@ ftp_expected_bytes (const char *s)
 	++s;
       if (!*s)
 	return 0;
+      ++s;			/* skip the '(' */
       res = str_to_wgint (s, (char **) &s, 10);
       if (!*s)
 	return 0;