[prev in list] [next in list] [prev in thread] [next in thread]
List: wget
Subject: possible bug in wget-1.10.2 and earlier
From: "Harrington, Paul" <Paul.Harrington () deshaw ! com>
Date: 2007-05-31 4:17:39
Message-ID: 66CBD2116D1A6D4AA500AD370172481002DACED1 () mailnyc3 ! nyc ! deshaw ! com
[Download RAW message or body]
Hi,
wget appears to be confused by FTP servers that only have one space
between the file-size information. We only came across this problem
today so I don't know how common it is.
pjjH
________________________________
From: Harrington, Paul
Sent: Thursday, May 31, 2007 12:06 AM
To: <recipient-removed>
Subject: RE: File issue using WGET
Your FTP server must have changed the output of the listing format or,
more precisely, the string representation of some of the components has
changed such that only one space separates the group name from the
file-size. The bug is, of course, with wget but it is one that hitherto
had not been observed when interacting with your FTP server.
pjjH
harringp@geneva1$ diff -u ftp-ls.c ~/tmp
--- ftp-ls.c 2005-08-04 17:52:33.000000000 -0400
+++ /u/harringp/tmp/ftp-ls.c 2007-05-31 00:02:07.209955000 -0400
@@ -229,6 +229,18 @@
break;
}
errno = 0;
+ /* after the while loop terminates, t may not always
+ point to a space character. In the case when
+ there is only one-space between the user/group
+ information and the file-size, the space will
+ have been overwritten by a \0 via strok(). So,
+ if you have been through the loop at least once,
+ advance forward one chacter.
+ */
+
+ if (t < ptok)
+ t++;
+
size = str_to_wgint (t, NULL, 10);
if (size == WGINT_MAX && errno == ERANGE)
/* Out of range -- ignore the size. #### Should
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>File issue using WGET</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3086" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff><SPAN
class=260411404-31052007>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff><SPAN
class=260411404-31052007>wget appears to be confused by FTP servers that only
have one space between the file-size information. We only came across this
problem today so I don't know how common it is.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff><SPAN
class=260411404-31052007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff><SPAN
class=260411404-31052007>pjjH</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff><SPAN
class=260411404-31052007></SPAN></FONT> </DIV><FONT face=Courier
color=#0000ff></FONT><FONT face=Courier color=#0000ff></FONT><FONT face=Courier
color=#0000ff></FONT><FONT face=Courier color=#0000ff></FONT><FONT face=Courier
color=#0000ff></FONT><FONT face=Courier color=#0000ff></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Harrington, Paul <BR><B>Sent:</B>
Thursday, May 31, 2007 12:06 AM<BR><B>To:</B><SPAN
class=260411404-31052007><FONT face=Courier color=#0000ff
size=3> <STRONG><FONT face=Tahoma color=#000000 size=2>
<recipient-removed></FONT></STRONG> </FONT></SPAN><BR><B>Subject:</B>
RE: File issue using WGET<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff><SPAN
class=642100304-31052007>Your FTP server must have changed the output of the
listing format or, more precisely, the string representation of some of the
components has changed such that only one space separates the group name from
the file-size. The bug is, of course, with wget but it is one that hitherto had
not been observed when interacting with your FTP server.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff><SPAN
class=642100304-31052007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff><SPAN
class=642100304-31052007></SPAN></FONT><FONT face=Courier color=#0000ff><SPAN
class=642100304-31052007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff><SPAN
class=642100304-31052007>pjjH</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff><SPAN
class=642100304-31052007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Courier color=#0000ff><A
href="mailto:harringp@geneva1$">harringp@geneva1$</A> diff -u ftp-ls.c
~/tmp<BR>--- ftp-ls.c 2005-08-04 17:52:33.000000000
-0400<BR>+++ /u/harringp/tmp/ftp-ls.c 2007-05-31
00:02:07.209955000 -0400<BR>@@ -229,6 +229,18
@@<BR> \
break;<BR> \
}<BR> \
errno =
0;<BR>+ \
/* after the while loop terminates, t may not
always<BR>+ \
point to a space character. In the case
when<BR>+ \
there is only one-space between the
user/group<BR>+ \
information and the file-size, the space
will<BR>+ \
have been overwritten by a \0 via strok().
So,<BR>+ \
if you have been through the loop at least
once,<BR>+ \
advance forward one
chacter.<BR>+ \
*/<BR>+<BR>+ \
if (t <
ptok)<BR>+ \
t++;<BR>+<BR> \
size = str_to_wgint (t, NULL,
10);<BR> \
if (size == WGINT_MAX && errno ==
ERANGE)<BR> \
/* Out of range -- ignore the size. #### Should<BR></DIV></FONT><BR>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><STRONG><FONT face=Tahoma
size=2></FONT></STRONG> </BLOCKQUOTE></BODY></HTML>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic