[PATCH] Fix a segfault on nfs+kickstart

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

 



This fix makes loaderData->stage2Data be initialized unconditionally.
Without it, we sometimes get a garbage pointer there, and that results
in a segfault (if you're lucky) in mountNfsImage when it tries to use
the data.
---
 loader/nfsinstall.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/loader/nfsinstall.c b/loader/nfsinstall.c
index 1a81547..8c52779 100644
--- a/loader/nfsinstall.c
+++ b/loader/nfsinstall.c
@@ -346,6 +346,7 @@ void setKickstartNfs(struct loaderData_s * loaderData, int argc,
     }
 
     loaderData->method = METHOD_NFS;
+    loaderData->stage2Data = NULL;
 
     substr = strstr(dir, ".img");
     if (!substr || (substr && *(substr+4) != '\0')) {
-- 
1.6.2.2

_______________________________________________
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