[PATCH] Fix a segfault when stage2= boot parameter and kickstart url method is used (#524417).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Concerns cases when stage2= can't be parsed as http or ftp url.

I am resending new version of a patch for F12Blocker (it is also attached to my
reply to clumen's review.
(https://www.redhat.com/archives/anaconda-devel-list/2009-September/msg00508.html)
---
 loader/urlinstall.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/loader/urlinstall.c b/loader/urlinstall.c
index 150800e..57b9bc2 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);
-- 
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux