summaryrefslogtreecommitdiffstats
path: root/loader/ftp.c
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-07-02 19:36:47 +0000
committerMatt Wilson <msw@redhat.com>2001-07-02 19:36:47 +0000
commite5f2e2bf8312e32bff63631131a48e31ecefbb03 (patch)
tree2a37eb5f879db3abb695f232a7fcae6e5d2f32e6 /loader/ftp.c
parent049365c53eff599c36695ea923b3316dca7a2615 (diff)
downloadanaconda-e5f2e2bf8312e32bff63631131a48e31ecefbb03.tar.gz
anaconda-e5f2e2bf8312e32bff63631131a48e31ecefbb03.tar.xz
anaconda-e5f2e2bf8312e32bff63631131a48e31ecefbb03.zip
allocate enough buffer to hold string, please don't blow our stack.
Diffstat (limited to 'loader/ftp.c')
-rw-r--r--loader/ftp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/loader/ftp.c b/loader/ftp.c
index 92bad61e6..7f0286f2d 100644
--- a/loader/ftp.c
+++ b/loader/ftp.c
@@ -441,7 +441,7 @@ int httpGetFileDesc(char * hostname, int port, char * remotename) {
return FTPERR_FAILED_CONNECT;
}
- buf = alloca(strlen(remotename) + 20);
+ buf = alloca(strlen(remotename) + strlen(hostname) + 25);
sprintf(buf, "GET %s HTTP/1.1\t\nHost: %s\r\n\r\n", remotename, hostname);
write(sock, buf, strlen(buf));