summaryrefslogtreecommitdiffstats
path: root/loader/urls.c
diff options
context:
space:
mode:
authorjakub <jakub>1999-10-20 12:11:09 +0000
committerjakub <jakub>1999-10-20 12:11:09 +0000
commit56ce72c21774c3c0134fb661cbae02f25839b918 (patch)
treed2fbd61e1189a66c759fd88c76968f0d08fd8d18 /loader/urls.c
parentc92ec4610dab49b285e8d7a78ca70687bfe1476b (diff)
downloadanaconda-56ce72c21774c3c0134fb661cbae02f25839b918.tar.gz
anaconda-56ce72c21774c3c0134fb661cbae02f25839b918.tar.xz
anaconda-56ce72c21774c3c0134fb661cbae02f25839b918.zip
Fix a segfault during ftp/http installs.
It is handy to sometimes link the loader with -lefence :)
Diffstat (limited to 'loader/urls.c')
-rw-r--r--loader/urls.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/loader/urls.c b/loader/urls.c
index 88b98e96e..ff5f65eb5 100644
--- a/loader/urls.c
+++ b/loader/urls.c
@@ -105,7 +105,7 @@ int urlMainSetupPanel(struct iurlinfo * ui, urlprotocol protocol,
newtComponent answer, text, cb = NULL;
char * site, * dir;
char * reflowedText = NULL;
- int width, height;
+ int width, height, len;
newtGrid entryGrid, buttons, grid;
if (ui->address) {
@@ -225,8 +225,9 @@ int urlMainSetupPanel(struct iurlinfo * ui, urlprotocol protocol,
ui->prefix = strdup(dir);
if (ui->urlprefix) free(ui->urlprefix);
- ui->urlprefix = malloc(sizeof(char) * (strlen(ui->address) +
- strlen(ui->prefix) + 10));
+ len = strlen(ui->address);
+ if (len < 15) len = 15;
+ ui->urlprefix = malloc(sizeof(char) * (len + strlen(ui->prefix) + 10));
if (*doSecondarySetup != '*') {
if (ui->login)