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

[PATCH] Don't segfault with "ks someotherparam" (#498307).



---
 loader/kickstart.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/loader/kickstart.c b/loader/kickstart.c
index b0a4c14..36b88fa 100644
--- a/loader/kickstart.c
+++ b/loader/kickstart.c
@@ -408,12 +408,13 @@ int isKickstartFileRemote(char *ksFile) {
         return 0;
     }
 
-    if (!strncmp(ksFile, "ks=", 3)) {
+    if (!strcmp(ksFile, "ks")) {
+       return 1;
+    } else if (!strncmp(ksFile, "ks=", 3)) {
         location = ksFile + 3;
     }
 
-    if (!strncmp(location, "ks", 2) ||
-        !strncmp(location, "http://";, 7) ||
+    if (!strncmp(location, "http://";, 7) ||
         !strncmp(location, "ftp://";, 6) ||
         !strncmp(location, "nfs:", 4)) {
         return 1;
-- 
1.6.1.3


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