This looks good for fixing the specific use case of specifying
repo=nfsiso:... without stage2=...
However, I fear ld->method will remain -1 or the like and ld->stage2Data
will remain without allocated memory whenever the user has a typo in his
repo method. Will loader still segfault when the user accidently
specified repo=vtp://... ? IMHO, anaconda should not break down on
invalid user input.
So
class = installMethods[validMethods[loaderData->method]].type;
in STEP_METHOD might access validMethods with an invalid index?
} else if (!loaderData->stage2Data && loaderData->instRepo) {
/* If no CD/DVD with a stage2 image was found and we were
given a
* repo=/method= parameter, try to piece together a valid
setting
* for the stage2= parameter based on that.
logMessage(INFO, "no stage2= given, assuming %s", tmp);
setStage2LocFromCmdline(tmp, loaderData);
free(tmp);
/* If we had to infer a stage2= location, but the repo=
parameter
* we based this guess on was wrong, we need to correct the
typo
* in both places. Unfortunately we can't really know what
the
* user meant, so the best we can do is take the results of
* running stage2= through the UI and chop off any
/images/whatever
* path that's at the end of it.
*/
To me this sounds as if this should handle my above case but apparently
didn't which in turn led to the segfault?
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
03-03-2010, 02:43 PM
Radek Vykydal
Derive stage2= from repo=nfsiso: correctly (#565885)
Thanks for review,
Steffen Maier wrote:
On 03/01/2010 05:34 PM, Radek Vykydal wrote:
Prevents sigsegv on x86_64.
I would think this bug exists cross-platform, i.e. not just x86_64.
After all it was originally reported for s390x.
You are right.
This looks good for fixing the specific use case of specifying
repo=nfsiso:... without stage2=...
However, I fear ld->method will remain -1 or the like and ld->stage2Data
will remain without allocated memory whenever the user has a typo in his
repo method. Will loader still segfault when the user accidently
specified repo=vtp://... ? IMHO, anaconda should not break down on
invalid user input.
True, I'd rather handle it in another patch (probably better
with appropriate new bug open?) that I am going to send to
devel list.
Radek
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list