From cf286eca628e0c950c0e8739a9803db1aa9c35ef Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 16 Feb 2004 23:00:44 +0000 Subject: fix buggy redhat code exhausted only in -Os which corrupted memory and gave wrong results for download file size in FTP/HTTP installs --- mdk-stage1/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mdk-stage1') diff --git a/mdk-stage1/url.c b/mdk-stage1/url.c index 47014fcb7..0c4dbbedf 100644 --- a/mdk-stage1/url.c +++ b/mdk-stage1/url.c @@ -337,7 +337,7 @@ static int ftp_get_filesize(int sock, char * remotename) } ptr = buf; - while ((tot = read(fd, ptr, sizeof(buf) - (ptr - buf))) != 0) + while ((tot = read(fd, ptr, sizeof(buf) - (ptr - buf) - 1)) != 0) ptr += tot; *ptr = '\0'; close(fd); -- cgit v1.2.1