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

[PATCH] Only try to split proxy commands out if there's actually one specified.



If we try to regexec() on NULL it segfaults, so let's try not to do
that...
---
 loader/urlinstall.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/loader/urlinstall.c b/loader/urlinstall.c
index cdffab8..b03efce 100644
--- a/loader/urlinstall.c
+++ b/loader/urlinstall.c
@@ -429,8 +429,12 @@ void setKickstartUrl(struct loaderData_s * loaderData, int argc,
         loaderData->method = METHOD_URL;
     }
 
-    splitProxyParam(proxy, &loaderData->proxyUser, &loaderData->proxyPassword,
-                    &loaderData->proxy, &loaderData->proxyPort);
+    if (proxy) {
+        splitProxyParam(proxy, &loaderData->proxyUser,
+			       &loaderData->proxyPassword,
+			       &loaderData->proxy,
+			       &loaderData->proxyPort);
+    }
     logMessage(INFO, "results of url ks, url %s", url);
 }
 
-- 
1.6.5.rc2


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