From 6e028d7c68c240289cf8de07b635c25a017c917f Mon Sep 17 00:00:00 2001 From: Radek Vykydal Date: Tue, 29 Sep 2009 13:22:21 +0200 Subject: Fix a segfault when stage2= boot parameter and kickstart url method is used (#524417). Concerns cases when stage2= can't be parsed as http or ftp url. --- loader/urlinstall.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'loader') diff --git a/loader/urlinstall.c b/loader/urlinstall.c index 150800e48..57b9bc21a 100644 --- a/loader/urlinstall.c +++ b/loader/urlinstall.c @@ -463,9 +463,7 @@ void setKickstartUrl(struct loaderData_s * loaderData, int argc, } /* determine install type */ - if (strstr(url, "http://") || strstr(url, "ftp://")) - loaderData->method = METHOD_URL; - else { + if (!strstr(url, "http://") && !strstr(url, "ftp://")) { newtWinMessage(_("Kickstart Error"), _("OK"), _("Unknown Url method %s"), url); return; @@ -479,6 +477,7 @@ void setKickstartUrl(struct loaderData_s * loaderData, int argc, return; ((struct urlInstallData *)loaderData->stage2Data)->url = url; + loaderData->method = METHOD_URL; } logMessage(INFO, "results of url ks, url %s", url); -- cgit