← Commit list

5ec58285c

Glenn L McGrath
Glenn L McGrath
2004-05-04
FAILED Duration: 25s

Subject

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

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/ftpgetput.c+6 -1
@@ -70,11 +70,16 @@ static int ftpcmd(const char *s1, const char *s2, FILE *stream, char *buf)
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);