diff options
author | Matt Wilson <msw@redhat.com> | 2001-07-02 19:36:47 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-07-02 19:36:47 +0000 |
commit | e5f2e2bf8312e32bff63631131a48e31ecefbb03 (patch) | |
tree | 2a37eb5f879db3abb695f232a7fcae6e5d2f32e6 /loader/ftp.c | |
parent | 049365c53eff599c36695ea923b3316dca7a2615 (diff) | |
download | anaconda-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.c | 2 |
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)); |