[BusyBox-cvs] busybox/networking ftpgetput.c,1.19,1.20
Glenn McGrath
bug1 at busybox.net
Tue May 4 10:43:36 UTC 2004
Update of /var/cvs/busybox/networking
In directory nail:/tmp/cvs-serv32703/networking
Modified Files:
ftpgetput.c
Log Message:
Fix size command, safe_strtoul gives and error if the \r is left in, the
RFC spec says the \r should be there.
This fix is the same as a recent wget fix
Index: ftpgetput.c
===================================================================
RCS file: /var/cvs/busybox/networking/ftpgetput.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- a/ftpgetput.c 25 Apr 2004 05:11:17 -0000 1.19
+++ b/ftpgetput.c 4 May 2004 10:43:34 -0000 1.20
@@ -70,11 +70,16 @@
fprintf(stream, "%s\n", s1);
}
}
-
do {
+ char *buf_ptr;
+
if (fgets(buf, 510, stream) == NULL) {
bb_perror_msg_and_die("fgets()");
}
+ buf_ptr = strstr(buf, "\r\n");
+ if (buf_ptr) {
+ *buf_ptr = '\0';
+ }
} while (! isdigit(buf[0]) || buf[3] != ' ');
return atoi(buf);
More information about the busybox-cvs
mailing list